Release 3.1.0 #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Approve for Owners | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- auto_merge_enabled | |
jobs: | |
auto-approve: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.user.login == github.repository_owner && github.event.pull_request.auto_merge != null | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Auto-approve pull request | |
run: | | |
curl -s -X POST \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \ | |
-d '{"event": "APPROVE", "body": "Auto-approved because this PR was opened by the repository owner and auto-merge is enabled."}' |