@@ -25,26 +25,28 @@ jobs:
25
25
)
26
26
)
27
27
steps :
28
- - name : GitHub App token
29
- id : github_app_token
30
-
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
+
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
36
36
37
- - name : Backport
38
-
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 %>
42
42
43
43
- name : Label new backport PR with backport-automerge label
44
44
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
46
48
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"
48
50
gh issue edit -R opensearch-project/documentation-website $PR_NUMBER --add-label backport-automerge
49
51
env :
50
- GH_TOKEN : ${{ steps.github_app_token.outputs.token }}
52
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments