Skip to content

Commit

Permalink
Merge pull request #320 from 2m/fix/auto-approve-2m
Browse files Browse the repository at this point in the history
Use GH CLI to autoapprove depencency PRs
  • Loading branch information
2m authored May 5, 2024
2 parents 534d288 + 4c9af6b commit af790e6
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ categories:
collapse-after: 3
labels:
- dependencies

autolabeler:
- label: 'dependencies'
branch:
- '/update\/.+/'
21 changes: 21 additions & 0 deletions .github/workflows/auto-approve.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Auto approve and merge dependency bump PRs

on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
auto-approve:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'scala-steward'
steps:
- run: gh pr review --approve "$PR_URL"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
- run: gh pr merge --auto --squash "$PR_URL"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
1 change: 1 addition & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: # yamllint disable-line rule:truthy
push:
branches:
- main
workflow_dispatch:

jobs:
update_release_draft:
Expand Down
38 changes: 0 additions & 38 deletions .mergify.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ rules:
line-length:
max: 100
level: warning

truthy:
allowed-values: ['true', 'false', 'on']

0 comments on commit af790e6

Please sign in to comment.