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

Make SHA in automerge workflow conditional on triggering event #462

Merged
merged 4 commits into from
Jan 7, 2024

Conversation

kvfairchild
Copy link
Contributor

The automerge workflow is triggered by pull_request events, status events, and check_run events. The workflow needs access to the last commit SHA of the PR that is modifying plugins, which for status and check_run events is accessible via the default environment variable GITHUB_SHA. However, for pull_request events this variable points to the merge commit instead. We therefore use github.event.pull_request.head.sha when the workflow is triggered by a pull_request event.

@kvfairchild kvfairchild merged commit 9054d4f into master Jan 7, 2024
0 of 5 checks passed
@kvfairchild kvfairchild deleted the kvf/update-github-env-var branch January 7, 2024 22:23
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.

1 participant