Skip to content

Commit 9d3cf58

Browse files
Tweak label creation logic on backport workflows
Signed-off-by: Peter Zhu <[email protected]>
1 parent afa4d27 commit 9d3cf58

File tree

6 files changed

+18
-128
lines changed

6 files changed

+18
-128
lines changed

Diff for: .github/workflows/add-untriaged.yml

-19
This file was deleted.

Diff for: .github/workflows/backport.yml

+18-16
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,28 @@ jobs:
2525
)
2626
)
2727
steps:
28-
- name: GitHub App token
29-
id: github_app_token
30-
uses: tibdex/[email protected]
31-
with:
32-
app_id: ${{ secrets.APP_ID }}
33-
private_key: ${{ secrets.APP_PRIVATE_KEY }}
34-
# opensearch-trigger-bot installation ID
35-
installation_id: 22958780
28+
# - name: GitHub App token
29+
# id: github_app_token
30+
# uses: tibdex/[email protected]
31+
# with:
32+
# app_id: ${{ secrets.APP_ID }}
33+
# private_key: ${{ secrets.APP_PRIVATE_KEY }}
34+
# # opensearch-trigger-bot installation ID
35+
# installation_id: 22958780
3636

37-
- name: Backport
38-
uses: VachaShah/[email protected]
39-
with:
40-
github_token: ${{ steps.github_app_token.outputs.token }}
41-
head_template: backport/backport-<%= number %>-to-<%= base %>
37+
# - name: Backport
38+
# uses: VachaShah/[email protected]
39+
# with:
40+
# github_token: ${{ steps.github_app_token.outputs.token }}
41+
# head_template: backport/backport-<%= number %>-to-<%= base %>
4242

4343
- name: Label new backport PR with backport-automerge label
4444
run: |
45-
PR_BRANCH=backport/backport-<%= number %>-to-<%= base %>
45+
PR_BRANCH=`echo ${{ github.event.label.name }}`
46+
PR_BRANCH=`echo $PR_BRANCH | cut -d ' ' -f2`
47+
PR_BRANCH=backport/backport-${{ github.event.pull_request.number }}-to-$PR_BRANCH
4648
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"
49+
echo "Update Backport PR '#$PR_NUMBER' on branch '$PR_BRANCH' with 'backport-automerge' label"
4850
gh issue edit -R opensearch-project/documentation-website $PR_NUMBER --add-label backport-automerge
4951
env:
50-
GH_TOKEN: ${{ steps.github_app_token.outputs.token }}
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/encoding-check.yml

-27
This file was deleted.

Diff for: .github/workflows/jekyll-build.yml

-16
This file was deleted.

Diff for: .github/workflows/link-checker.yml

-26
This file was deleted.

Diff for: .github/workflows/vale.yml

-24
This file was deleted.

0 commit comments

Comments
 (0)