chore: distinguish backport pull requests by title and label (#32381)
This commit is contained in:
parent
eb95f2166e
commit
4433480e45
2 changed files with 11 additions and 3 deletions
8
.github/workflows/claude-issue-agent.yml
vendored
8
.github/workflows/claude-issue-agent.yml
vendored
|
|
@ -30,8 +30,12 @@ jobs:
|
|||
pr-label:
|
||||
name: PR labeling
|
||||
# bot PRs (dependabot etc.) are skipped: the action rejects non-human actors
|
||||
# unless allowlisted, and bots already label their own PRs
|
||||
if: github.event_name == 'pull_request_target' && github.event.pull_request.user.type != 'Bot'
|
||||
# unless allowlisted, and bots already label their own PRs. backports are
|
||||
# skipped as well, they carry the backport label and nothing else
|
||||
if: |
|
||||
github.event_name == 'pull_request_target' &&
|
||||
github.event.pull_request.user.type != 'Bot' &&
|
||||
!startsWith(github.event.pull_request.head.ref, 'backport/')
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read # read base repo for area classification
|
||||
|
|
|
|||
6
.github/workflows/command-backport.yml
vendored
6
.github/workflows/command-backport.yml
vendored
|
|
@ -158,11 +158,15 @@ jobs:
|
|||
NUMBER: ${{ github.event.issue.number }}
|
||||
ACTOR: ${{ github.event.comment.user.login }}
|
||||
run: |
|
||||
# the release line the branch was cut from, 0.313 for release/0.313.1
|
||||
line=$(echo "${TARGET#release/}" | cut -d. -f1,2)
|
||||
|
||||
# the pull request is authored by the deploy token, so name the requester
|
||||
url=$(gh pr create \
|
||||
--base "$TARGET" \
|
||||
--head "$BRANCH" \
|
||||
--title "$TITLE" \
|
||||
--title "$line backport: $TITLE" \
|
||||
--label backport \
|
||||
--assignee "$ACTOR" \
|
||||
--body "Backport of #$NUMBER to \`$TARGET\`, requested by @$ACTOR.")
|
||||
echo "url=$url" >> "$GITHUB_OUTPUT"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue