Skip to content

Commit

Permalink
Add a label to backport PRs in preparation for backport automerge
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon committed Apr 2, 2024
1 parent 9ff5db3 commit a799e88
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ jobs:
with:
github_token: ${{ steps.github_app_token.outputs.token }}
head_template: backport/backport-<%= number %>-to-<%= base %>

- name: Label new backport PR with backport-automerge label
run: |
PR_BRANCH=backport/backport-<%= number %>-to-<%= base %>
PR_NUMBER=`gh pr list -R peterzhuamazon/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"
gh issue edit -R opensearch-project/documentation-website $PR_NUMBER --add-label backport-automerge
env:
GH_TOKEN: ${{ steps.github_app_token.outputs.token }}

0 comments on commit a799e88

Please sign in to comment.