mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-15 10:03:02 +01:00
Use GitHub token for auto-approve workflow
This commit is contained in:
@@ -19,11 +19,18 @@ jobs:
|
||||
if: github.event.pull_request.user.id == 8171642 && !github.event.pull_request.draft && !contains(github.event.pull_request.body, '- [ ]') && (github.event.pull_request.base.repo.owner.login == 'tgstation' || github.event.pull_request.base.repo.owner.login == 'Cyberboss')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Generate App Token
|
||||
id: app-token-generation
|
||||
uses: getsentry/action-github-app-token@d4b5da6c5e37703f8c3b3e43abb5705b46e159cc
|
||||
with:
|
||||
app_id: ${{ secrets.APP_ID }}
|
||||
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||
|
||||
- name: GitHub API Call
|
||||
run: |
|
||||
curl --request POST \
|
||||
--url https://api.github.com/repos/${{github.repository}}/pulls/${{github.event.number}}/reviews \
|
||||
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
|
||||
--header 'authorization: Bearer ${{ steps.app-token-generation.outputs.token }}' \
|
||||
--header 'content-type: application/json' \
|
||||
-d '{"event":"APPROVE"}' \
|
||||
--fail
|
||||
|
||||
Reference in New Issue
Block a user