Skip to content

Commit afeaa5b

Browse files
authored
🐛 alter default backport pull title (#28)
2 parents 32f412d + d19a831 commit afeaa5b

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

.github/workflows/cherry-pick.yaml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
const labels = issue.labels.map(label => label.name);
2424
console.log(`Labels: ${labels}`);
2525
26-
const branches = labels.filter(label => label.startsWith('cherry-pick/'))
27-
.map(label => label.substr(12));
26+
const branches = labels.filter(label => label.startsWith('backport '))
27+
.map(label => label.substr(9));
2828
console.log(`Branches: ${branches}`);
2929
3030
return branches
@@ -51,13 +51,7 @@ jobs:
5151
application_private_key: ${{ secrets.TRUSTIFICATION_BOT_KEY }}
5252

5353
- name: Cherry-pick
54-
env:
55-
GH_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
56-
run: |
57-
BRANCH_NAME="cherry-pick-pr${{ github.event.number }}-${{ matrix.branch }}"
58-
git config --global user.email "noreply@github.com"
59-
git config --global user.name "Cherry Picker"
60-
git checkout -b ${BRANCH_NAME}
61-
git cherry-pick -s ${{ github.sha }}
62-
git push origin ${BRANCH_NAME}
63-
gh pr create --base ${{ matrix.branch }} --fill
54+
uses: korthout/backport-action@v3
55+
with:
56+
github_token: ${{ steps.get_workflow_token.outputs.token }}
57+
pull_title: '${pull_title} [Backport ${target_branch}]'

0 commit comments

Comments
 (0)