Skip to content

Add automatic approval action #3

Add automatic approval action

Add automatic approval action #3

Workflow file for this run

# yamllint disable rule:line-length
# yamllint disable rule:braces
name: PR Approval
on:
pull_request:
jobs:
your_job_name:
runs-on: ubuntu-latest
steps:
- name: Auto-approve repository owner's PR
env:
GH_TOKEN: ${{ github.token }}
run: |
PR_AUTHOR=$(gh pr view ${{ github.event.number }} --json user.login -q '.user.login')
if [[ "${{ github.actor }}" == "${PR_AUTHOR}" ]]; then
gh pr review ${{ github.event.number }} --approve
fi