Skip to content

Commit ee60e3a

Browse files
authored
fix: correct backport PR template syntax and clear auto-assignee (#798)
1 parent b953ec8 commit ee60e3a

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

.backportrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"branchLabelMapping": {
33
"^backport-to-(release/.+)$": "$1"
44
},
5-
"prTitle": "{commitMessages} (backport to {targetBranch})",
5+
"prTitle": "{{commitMessages}} (backport to {{targetBranch}})",
6+
"prDescription": "# Backport\n\nThis will backport the following commits from `{{sourceBranch}}` to `{{targetBranch}}`:\n\n- {{commitMessages}}",
67
"targetPRLabels": ["backport"],
78
"autoMerge": false
89
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Clear assignee on backport PRs
2+
on:
3+
pull_request_target:
4+
types: [assigned]
5+
permissions:
6+
pull-requests: write
7+
jobs:
8+
clear:
9+
if: startsWith(github.event.pull_request.head.ref, 'backport/')
10+
runs-on: depot-ubuntu-24.04
11+
steps:
12+
- name: Remove the newly added assignee
13+
env:
14+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
PR: ${{ github.event.pull_request.number }}
16+
USER: ${{ github.event.assignee.login }}
17+
REPO: ${{ github.repository }}
18+
run: gh pr edit "$PR" --repo "$REPO" --remove-assignee "$USER"

0 commit comments

Comments
 (0)