Skip to content

Commit

Permalink
Tweak label creation logic on backport workflows (#6871) (#6873)
Browse files Browse the repository at this point in the history
* Tweak label creation logic on backport workflows



* Tweak label creation logic on backport workflows



---------


(cherry picked from commit 801b6ec)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
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 <97990722+Naarcha-AWS@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 4, 2024
1 parent d08e53a commit 0d26bd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:

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

0 comments on commit 0d26bd2

Please sign in to comment.