Repository navigation
ci: label the release pull request automatically - #1386
Merged
Merged
Conversation
ready-release-go can't set labels on its release pull request, so the required labels check failed until someone added Docs:Build&Tools by hand. Add the label in the labels workflow before the check runs. The check reads the labels from the API, so it sees the new label.
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review this pull request because all changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The release pull request that ready-release-go opens (
🎉 Release x.y.z, branchnext-release/main) has no labels, so the "Require Pull Request Labels" check fails until someone addsDocs:Build&Toolsby hand (e.g. #1376, #1362, #1353).ready-release-go can't set labels itself. It only reads PR labels for the changelog and the version bump, and its config hooks don't get the pull request. So this PR adds a step to
.github/workflows/labels.ymlthat runs only for thenext-release/mainbranch and addsDocs:Build&Toolsthrough the REST API, before the required-labels check runs.The check (
mheap/github-action-required-labels@v5) fetches the labels from the API instead of the event payload, explicitly "in case earlier steps added a label", so it sees the new label in the same run. The job already haspull-requests: writeandissues: write.Tested
github.event.pull_request.head.ref == 'next-release/main'.main, which triggers this workflow. To see it work, remove the label from the open release PR once this is merged.