Skip to content

Commit

Permalink
Tweak label creation logic on backport workflows
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 3, 2024
1 parent afa4d27 commit 9d3cf58
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 128 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/add-untriaged.yml

This file was deleted.

34 changes: 18 additions & 16 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,28 @@ jobs:
)
)
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/github-app-token@v1.5.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
# opensearch-trigger-bot installation ID
installation_id: 22958780
# - name: GitHub App token
# id: github_app_token
# uses: tibdex/github-app-token@v1.5.0
# with:
# app_id: ${{ secrets.APP_ID }}
# private_key: ${{ secrets.APP_PRIVATE_KEY }}
# # opensearch-trigger-bot installation ID
# installation_id: 22958780

- name: Backport
uses: VachaShah/backport@v2.1.0
with:
github_token: ${{ steps.github_app_token.outputs.token }}
head_template: backport/backport-<%= number %>-to-<%= base %>
# - name: Backport
# uses: VachaShah/backport@v2.1.0
# 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_BRANCH=`echo ${{ github.event.label.name }}`
PR_BRANCH=`echo $PR_BRANCH | cut -d ' ' -f2`
PR_BRANCH=backport/backport-${{ github.event.pull_request.number }}-to-$PR_BRANCH
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 }}
27 changes: 0 additions & 27 deletions .github/workflows/encoding-check.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/jekyll-build.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/link-checker.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/vale.yml

This file was deleted.

0 comments on commit 9d3cf58

Please sign in to comment.