Skip to content

Commit

Permalink
dependabot and review automation
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-r-warren committed May 3, 2024
1 parent 2107cd5 commit 729b216
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/sherlock-check-reviews.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Review Check
on:
pull_request:
types:
- ready_for_review
branches:
- main
pull_request_review:
types:
- edited
- dismissed
- submitted
branches:
- main
jobs:
check-reviews:
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Get review counts
id: reviews
uses: jrylan/github-action-reviews-counter@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Fail if insufficient reviews
if: github.actor != 'dependabot[bot]' && (steps.reviews.outputs.approved < 2 || steps.reviews.outputs.changes_requested > 0)
run: |
echo "Insufficient reviews"
exit 1
4 changes: 3 additions & 1 deletion .github/workflows/sherlock-check-ticket.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: 'Ticket Check'
name: Ticket Check
on:
pull_request:
types:
- ready_for_review
branches:
- main
jobs:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/sherlock-dependabot-automerge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Dependabot Auto-Merge
on:
pull_request:
types:
- ready_for_review
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
dependabot-automerge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Enable auto-merge for Dependabot PRs
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr merge --auto --merge "$PR_URL"

0 comments on commit 729b216

Please sign in to comment.