Skip to content

Commit 0d26bd2

Browse files
opensearch-trigger-bot[bot]github-actions[bot]Naarcha-AWS
authored
Tweak label creation logic on backport workflows (#6871) (#6873)
* Tweak label creation logic on backport workflows * Tweak label creation logic on backport workflows --------- (cherry picked from commit 801b6ec) Signed-off-by: Peter Zhu <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Naarcha-AWS <[email protected]>
1 parent d08e53a commit 0d26bd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: .github/workflows/backport.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242

4343
- name: Label new backport PR with backport-automerge label
4444
run: |
45-
PR_BRANCH=backport/backport-<%= number %>-to-<%= base %>
45+
PR_BRANCH=backport/backport-${{ github.event.pull_request.number }}-to-`echo ${{ github.event.label.name }} | cut -d ' ' -f2`
4646
PR_NUMBER=`gh pr list -R opensearch-project/documentation-website --json "number,headRefName" --state open | jq -r ".[] | select(.headRefName == \"$PR_BRANCH\") | .number"`
47-
echo "Update Backport PR #$PR_NUMBER on branch $PR_BRANCH with backport-automerge label"
47+
echo "Update Backport PR '#$PR_NUMBER' on branch '$PR_BRANCH' with 'backport-automerge' label"
4848
gh issue edit -R opensearch-project/documentation-website $PR_NUMBER --add-label backport-automerge
4949
env:
50-
GH_TOKEN: ${{ steps.github_app_token.outputs.token }}
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)