auto-approve-konflux-nudges #2
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-konflux-nudges | |
on: | |
workflow_dispatch: {} | |
# schedule: | |
# - cron: "*/30 * * * *" # At every 30 minutes | |
jobs: | |
auto-approve: | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'openshift-pipelines' # do not run this elsewhere | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout the current repo | |
uses: actions/checkout@v4 | |
- name: auto-approve | |
run: | | |
for p in $(gh pr list --search "author:app/red-hat-konflux chore(deps) .*" --json "title,labels,number" | jq ".[] | select((.labels | length) == 0) | .number"); do | |
gh pr review $p --approve --body "/lgtm" | |
done | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |