Skip to content

Commit

Permalink
Update autoapprove.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
plengauer authored Nov 23, 2024
1 parent 7ef9e52 commit 91de98b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/autoapprove.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ name: Autoapprove

on:
pull_request:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:

concurrency:
group: approve
group: approve-${{ github.event.pull_request.number }}

jobs:
approve:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- run: |
curl --no-progress-meter -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/pulls?per_page=100 \
| jq '.[] | select(.state == "open") | select(.user.login == "actions-bot-pl") | .number' \
| xargs -I '{}' curl --no-progress-meter -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/pulls/'{}'/reviews -d '{"event":"APPROVE","body":"This is an automated approval."}'
- uses: plengauer/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
user_to_approve: ${{ secrets.ACTIONS_GITHUB_TOKEN }}

0 comments on commit 91de98b

Please sign in to comment.