@@ -19,21 +19,11 @@ jobs:
1919 with :
2020 fetch-depth : 1
2121
22- - name : ' Generate GitHub App Token'
23- id : ' generate_token'
24- uses : ' actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b'
25- with :
26- app-id : ' ${{ secrets.APP_ID }}'
27- private-key : ' ${{ secrets.PRIVATE_KEY }}'
28- permission-pull-requests : ' write'
29- permission-contents : ' write'
30- permission-actions : ' write'
31-
3222 - name : ' Slash Command Dispatch'
3323 id : ' slash_command'
3424 uses : ' peter-evans/slash-command-dispatch@40877f718dce0101edfc7aea2b3800cc192f9ed5'
3525 with :
36- token : ' ${{ steps.generate_token.outputs.token }}'
26+ token : ' ${{ secrets.GITHUB_TOKEN }}'
3727 commands : ' patch'
3828 permission : ' write'
3929 issue-type : ' pull-request'
4434 id : ' pr_status'
4535 if : " startsWith(github.event.comment.body, '/patch')"
4636 env :
47- GH_TOKEN : ' ${{ steps.generate_token.outputs.token }}'
37+ GH_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
4838 run : |
4939 gh pr view "${{ github.event.issue.number }}" --json mergeCommit,state > pr_status.json
5040 echo "MERGE_COMMIT_SHA=$(jq -r .mergeCommit.oid pr_status.json)" >> "$GITHUB_OUTPUT"
5747 env :
5848 COMMENT_BODY : ' ${{ github.event.comment.body }}'
5949 with :
50+ github-token : ' ${{ secrets.GITHUB_TOKEN }}'
6051 script : |
6152 // Parse the comment body directly to extract channel
6253 const commentBody = process.env.COMMENT_BODY;
@@ -123,7 +114,7 @@ jobs:
123114 if : " startsWith(github.event.comment.body, '/patch') && steps.pr_status.outputs.STATE != 'MERGED'"
124115 uses : ' peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d'
125116 with :
126- token : ' ${{ steps.generate_token.outputs.token }}'
117+ token : ' ${{ secrets.GITHUB_TOKEN }}'
127118 issue-number : ' ${{ github.event.issue.number }}'
128119 body : |
129120 :x: The `/patch` command failed. This pull request must be merged before a patch can be created.
@@ -132,7 +123,7 @@ jobs:
132123 if : " always() && startsWith(github.event.comment.body, '/patch') && steps.dispatch_patch.outcome == 'success' && steps.dispatch_patch.outputs.dispatched_run_url"
133124 uses : ' peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d'
134125 with :
135- token : ' ${{ steps.generate_token.outputs.token }}'
126+ token : ' ${{ secrets.GITHUB_TOKEN }}'
136127 issue-number : ' ${{ github.event.issue.number }}'
137128 body : |
138129 ✅ **Patch workflow dispatched successfully!**
@@ -149,7 +140,7 @@ jobs:
149140 if : " always() && startsWith(github.event.comment.body, '/patch') && steps.dispatch_patch.outcome == 'success' && !steps.dispatch_patch.outputs.dispatched_run_url"
150141 uses : ' peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d'
151142 with :
152- token : ' ${{ steps.generate_token.outputs.token }}'
143+ token : ' ${{ secrets.GITHUB_TOKEN }}'
153144 issue-number : ' ${{ github.event.issue.number }}'
154145 body : |
155146 ✅ **Patch workflow dispatched successfully!**
@@ -166,7 +157,7 @@ jobs:
166157 if : " always() && startsWith(github.event.comment.body, '/patch') && (steps.dispatch_patch.outcome == 'failure' || steps.dispatch_patch.outcome == 'cancelled')"
167158 uses : ' peter-evans/create-or-update-comment@67dcc547d311b736a8e6c5c236542148a47adc3d'
168159 with :
169- token : ' ${{ steps.generate_token.outputs.token }}'
160+ token : ' ${{ secrets.GITHUB_TOKEN }}'
170161 issue-number : ' ${{ github.event.issue.number }}'
171162 body : |
172163 ❌ **Patch workflow dispatch failed!**
0 commit comments