Skip to content

Commit

Permalink
fix: ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
nickevansuk authored Sep 22, 2023
1 parent e60ca10 commit bc91ce9
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Auto-approve dependabot PRs

on:
schedule:
- cron: '*/10 * * * *' # Runs every 10 minutes

permissions:
pull-requests: write

jobs:
approve:
runs-on: ubuntu-latest
steps:
- name: Fetch all PRs
id: prs
run: |
prs=$(gh pr list --author 'dependabot[bot]' --json number,createdAt --label "dependencies" --state open | jq -r '.[] | select((.createdAt | fromdateiso8601) < (now - (15))) | .number')
echo "::set-output name=prs::$prs"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Approve PRs
if: steps.prs.outputs.prs != ''
run: |
for pr in ${{ steps.prs.outputs.prs }}
do
gh pr review --approve $pr
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit bc91ce9

Please sign in to comment.