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

Add RUN_ATTEMPT to @actions/github Context class #1588

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

sshmaxime
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? 🙇

@sshmaxime
Copy link
Contributor Author

@TingluoHuang Done 🙏

@TingluoHuang TingluoHuang merged commit 0787a93 into actions:main Nov 28, 2023
14 checks passed
@sshmaxime
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. 😢

@sshmaxime
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