Skip to content

CI: Add workflow to remove backport labels on merge into release branches#4562

Merged
IanButterworth merged 5 commits intoJuliaLang:masterfrom
IanButterworth:ib/backport_label_remover
Jan 14, 2026
Merged

CI: Add workflow to remove backport labels on merge into release branches#4562
IanButterworth merged 5 commits intoJuliaLang:masterfrom
IanButterworth:ib/backport_label_remover

Conversation

@IanButterworth
Copy link
Copy Markdown
Member

@IanButterworth IanButterworth commented Dec 11, 2025

Adds two actions:

Backport Label Cleanup (automatic)

When a backport PR is merged to a release branch, this workflow automatically removes the backport-X.Y label from the original PRs that were cherry-picked, and adds a comment linking to the backport PR and commit.

Backport Label Audit (manual)

A workflow_dispatch action that can scan all PRs with a backport-X.Y label and check whether they have already been cherry-picked into the release-X.Y branch. Useful for catching any PRs that were missed. Defaults to dry run mode to allow review before making changes.


Both should make it easier to track what has been backported and in which backport PR.

@IanButterworth IanButterworth requested a review from a team as a code owner December 11, 2025 00:03
@github-project-automation github-project-automation bot moved this to New in Pkg.jl Dec 11, 2025
@IanButterworth IanButterworth force-pushed the ib/backport_label_remover branch from 3a7aac3 to 16d720d Compare December 11, 2025 00:14
@IanButterworth IanButterworth moved this from New to In review in Pkg.jl Dec 11, 2025
@IanButterworth IanButterworth force-pushed the ib/backport_label_remover branch 2 times, most recently from c1f577b to 7180819 Compare December 11, 2025 00:23
@IanButterworth
Copy link
Copy Markdown
Member Author

We could try this on #4563 if you agree?
@KristofferC @DilumAluthge

@DilumAluthge
Copy link
Copy Markdown
Member

DilumAluthge commented Dec 11, 2025

I haven't had a chance to review the code yet, so I'll defer to you and Kristoffer, if you're interested in trying this out soon.

I will try to review the code at some point (even if it's post-merge).

@DilumAluthge
Copy link
Copy Markdown
Member

Scoped to this repo only - All API calls use context.repo.owner/context.repo.repo, preventing cross-repo manipulation"

Small comment: As long as you're using the default GITHUB_TOKEN (and no other secrets), then IIUC there inherently is no risk of cross-repo manipulation, because IIRC GitHub only gives GITHUB_TOKEN permissions on the repo where the CI job is running.

@KristofferC
Copy link
Copy Markdown
Member

We kind of want this for any repo that uses the backport app so I wonder if it wouldn't be easier to add the functionality directly to the backport app instead of having it as a GHA?

@IanButterworth
Copy link
Copy Markdown
Member Author

IanButterworth commented Dec 12, 2025

Ok yeah add as a tool to Backporter and call that in the close and workflow actions

@IanButterworth
Copy link
Copy Markdown
Member Author

IanButterworth commented Dec 12, 2025

Now uses KristofferC/Backporter#14 which has an example run

IanButterworth and others added 5 commits January 14, 2026 18:28
When a backport PR is merged to a release branch, this workflow
automatically removes the backport-X.Y label from the original PRs
that were cherry-picked, and adds a comment linking to the backport PR.

Co-Authored-By: Claude <noreply@anthropic.com>
Manual workflow_dispatch action that scans PRs with backport-X.Y labels
and checks if they have already been cherry-picked into the release branch.
Defaults to dry run mode to allow review before making changes.

Co-Authored-By: Claude <noreply@anthropic.com>
@IanButterworth IanButterworth force-pushed the ib/backport_label_remover branch from c024359 to 12cd227 Compare January 14, 2026 23:30
@IanButterworth IanButterworth merged commit 04d818d into JuliaLang:master Jan 14, 2026
8 of 9 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Pkg.jl Jan 14, 2026
@IanButterworth IanButterworth deleted the ib/backport_label_remover branch January 14, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants