Skip to content

ci: auto-label release PRs with release-management#14744

Open
Maffooch wants to merge 1 commit intomasterfrom
ci/label-release-prs
Open

ci: auto-label release PRs with release-management#14744
Maffooch wants to merge 1 commit intomasterfrom
ci/label-release-prs

Conversation

@Maffooch
Copy link
Copy Markdown
Contributor

@Maffooch Maffooch commented Apr 23, 2026

Summary

  • Extend the three Create Pull Request steps in .github/workflows/release-1-create-pr.yml and .github/workflows/release-3-master-into-dev.yml to await github.rest.pulls.create(...) and immediately call github.rest.issues.addLabels(...) with ['release-management'].
  • Keeps labeling local to the release workflows rather than routing through .github/labeler.yml, so the label isn't subject to sync-labels: true re-evaluation on later PR events.

Prerequisite

The release-management label must exist in the repo before the next release workflow runs — issues.addLabels does not create missing labels. Create it once via the Labels UI or:

gh label create release-management --description "Automated release-train PR" --color 0E8A16 --repo DefectDojo/django-DefectDojo

Test plan

  • Confirm the release-management label exists in the repo.
  • On the next Release-1 run, verify the resulting PR carries the release-management label and the Create Pull Request step is green in the Actions log.
  • Same check after Release-3: both the …into dev and …into bugfix PRs should get the label.

🤖 Generated with Claude Code

Tags every PR opened by release-1-create-pr.yml and release-3-master-into-dev.yml (release, master-into-dev, master-into-bugfix) with the release-management label, so release PRs are easy to filter and automate on without title/branch-regex matching.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Maffooch Maffooch requested a review from mtesauro as a code owner April 23, 2026 01:19
@Maffooch Maffooch requested a review from rossops April 23, 2026 01:20
@Maffooch Maffooch added this to the 2.57.3 milestone Apr 23, 2026
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