Skip to content

Automatically approve all automatic PRs #1

Automatically approve all automatic PRs

Automatically approve all automatic PRs #1

Workflow file for this run

name: Autoapprove
on:
pull_request:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
concurrency:
group: approve
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."}'