Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use name property to find current job in GitHub API response #1860

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

lawrence-forooghian
Copy link
Collaborator

This updates the change made in d7e7736. Copied from test-observability-action commit 518bc5e. Motivation as described in that commit:

I originally tried implementing this by passing a job-index input, whose
value was the index to which the current job corresponds in the response
from the "list jobs for a workflow run attempt" GitHub API. However,
some experimentation then showed that that the order in which the jobs
are listed in the action YAML file doesn’t necessarily match that in
which they are returned from the API, so there was no way to calculate
the value to pass for job-index. Hence, switched to using the job’s
name instead.

@github-actions github-actions bot temporarily deployed to staging/pull/1860/features January 23, 2024 09:59 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1860/jazzydoc January 23, 2024 10:05 Inactive
This updates the change made in d7e7736. Copied from
test-observability-action commit 518bc5e. Motivation as described in
that commit:

> I originally tried implementing this by passing a job-index input, whose
> value was the index to which the current job corresponds in the response
> from the "list jobs for a workflow run attempt" GitHub API. However,
> some experimentation then showed that that the order in which the jobs
> are listed in the action YAML file doesn’t necessarily match that in
> which they are returned from the API, so there was no way to calculate
> the value to pass for job-index. Hence, switched to using the job’s
> `name` instead.
Copy link
Collaborator

@maratal maratal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lawrence-forooghian lawrence-forooghian merged commit f2d9089 into main Jan 23, 2024
6 of 7 checks passed
@lawrence-forooghian lawrence-forooghian deleted the fix-job-index-calculation branch January 23, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants