Skip to content

Add RUN_ATTEMPT to @actions/github Context class#1588

Merged
TingluoHuang merged 1 commit intoactions:mainfrom
0xbuidler:main
Nov 28, 2023
Merged

Add RUN_ATTEMPT to @actions/github Context class#1588
TingluoHuang merged 1 commit intoactions:mainfrom
0xbuidler:main

Conversation

@0xbuidler
Copy link
Contributor

This PR add GITHUB_RUN_ATTEMPT to @actions/github Context class.

I need to retrieve the RUN_ATTEMPT variable in order to retrieve some informations from my jobs using Octokit, like so:

 const jobs = await octokit.paginate(octokit.rest.actions.listJobsForWorkflowRunAttempt, {
    owner: github.context.repo.owner,
    repo: github.context.repo.repo,
    run_id: github.context.runId,
    attempt_number: github.context.runAttempt, // Missing :'(
  });

@TingluoHuang
Copy link
Member

@sshmaxime do you mind fix those linter error? 🙇

@0xbuidler
Copy link
Contributor Author

@TingluoHuang Done 🙏

@TingluoHuang TingluoHuang merged commit 0787a93 into actions:main Nov 28, 2023
@0xbuidler
Copy link
Contributor Author

@TingluoHuang Thank you for your fast review and merge 🙏 Do you think you'll publish asap to npm ?

@TingluoHuang
Copy link
Member

@sshmaxime i might not have permission to publish one. 😢

@0xbuidler
Copy link
Contributor Author

Oh that's really sad. Who should I contact, if any @TingluoHuang ? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants