Skip to content

ci: label the release pull request automatically - #1386

Merged
AlexAndBear merged 1 commit into
mainfrom
ci/label-release-prs
Nov 16, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
ci/label-release-prs

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

The release pull request that ready-release-go opens (🎉 Release x.y.z, branch next-release/main) has no labels, so the "Require Pull Request Labels" check fails until someone adds Docs:Build&Tools by 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.yml that runs only for the next-release/main branch and adds Docs:Build&Tools through 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 has pull-requests: write and issues: write.

Tested

  • The workflow YAML parses, and the new step only runs when github.event.pull_request.head.ref == 'next-release/main'.
  • Checked the endpoint and the label name with a read-only API call against 🎉 Release 3.60.0 #1376.
  • The real test is the next release PR update after this is merged. ready-release-go updates the release PR on every push to main, which triggers this workflow. To see it work, remove the label from the open release PR once this is merged.

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.
Copilot AI balanced review requested due to automatic review settings November 16, 2026 13:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@AlexAndBear
AlexAndBear requested a review from Svanvith November 16, 2026 13:26

@Svanvith Svanvith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@AlexAndBear
AlexAndBear merged commit 3255956 into main Nov 16, 2026
7 checks passed
@AlexAndBear
AlexAndBear deleted the ci/label-release-prs branch November 16, 2026 13:29
@openclouders openclouders mentioned this pull request Nov 16, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

⌂ Proxy