@@ -47,14 +47,11 @@ jobs:
47
47
base : main
48
48
committer : opensearchpy-api-update-bot <noreply@github.com>
49
49
author : opensearchpy-api-update-bot <noreply@github.com>
50
- - name : printed
50
+ - name : Check out update branch
51
+ if : ${{ steps.cpr.outputs.pull-request-number != '' }}
51
52
run : |
52
- echo "Checking find pattern in CHANGELOG.md..."
53
- grep -n "Your contribution here." CHANGELOG.md || echo "Pattern not found."
54
- - name : Checkout PR
55
- env :
56
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
57
- run : gh pr checkout ${{ steps.cpr.outputs.pull-request-number }}
53
+ git fetch origin automated-api-update
54
+ git checkout automated-api-update
58
55
- name : Update CHANGELOG
59
56
uses : jacobtomlinson/gha-find-replace@v3
60
57
if : ${{ steps.cpr.outputs.pull-request-number != '' }}
@@ -65,22 +62,16 @@ jobs:
65
62
include : " **CHANGELOG.md"
66
63
- name : Commit and Push
67
64
if : ${{ steps.cpr.outputs.pull-request-number != '' }}
68
- env :
69
- token : ${{ secrets.GITHUB_TOKEN }}
70
65
run : |
71
66
git config --local user.name 'opensearchpy-api-update-bot'
72
67
git config --local user.email 'noreply@github.com'
73
68
git config --local --unset-all http.https://github.com/.extraheader || true
74
69
AUTH=$(echo -n "x-access-token:${{ steps.github_app_token.outputs.token || secrets.GITHUB_TOKEN }}" | base64)
75
70
echo "::add-mask::${AUTH}"
76
71
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ${AUTH}"
77
- add_output=$(git add CHANGELOG.md)
78
- commit_output=$(git commit --amend --no-edit)
79
- cat CHANGELOG.md
80
- PUSH_OUTPUT=$(gh pr merge ${{ steps.cpr.outputs.pull-request-number }} --squash --merge --auto)
81
- echo "Git Add Output: $add_output"
82
- echo "Git Commit Output: $commit_output"
83
- echo "PUSHED_OUTPUT: $PUSH_OUTPUT"
72
+ git add CHANGELOG.md
73
+ git commit --amend --no-edit
74
+ git push origin automated-api-update -f
84
75
- name : List modified files for automated-api-update branch
85
76
run : |
86
77
branch_commit=$(git rev-parse automated-api-update)
0 commit comments