Skip to content

Commit

Permalink
Enable automerge for pre commit hook updates (#102)
Browse files Browse the repository at this point in the history
* ci: Allow the trove-classifiers package to automerge for minor version increments since it uses date versioning

* ci: Enable auto-merge for pre-commit.ci autoupdate PRs

* ci: Update workflow name
  • Loading branch information
nfelt14 committed Sep 19, 2024
1 parent 3ee8e30 commit c2ebdaa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
"automerge": true,
"description": "Allow automatically merging minor updates of certain packages",
"matchPackageNames": [
"certifi"
"certifi",
"trove-classifiers"
],
"matchUpdateTypes": [
"minor"
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
---
name: Auto approve Renovate PRs
name: Auto approve Renovate/pre-commit.ci PRs
on:
pull_request_target:
jobs:
auto-approve:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
if: (github.actor == 'renovate[bot]' && startsWith(github.head_ref, 'renovate/automerge/'))
|| (github.actor == 'pre-commit-ci[bot]' && startsWith(github.head_ref, 'pre-commit-ci-update-config'))
steps:
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
- name: Enable auto-merge for pre-commit.ci autoupdate PRs
if: github.actor == 'pre-commit-ci[bot]' && startsWith(github.head_ref, 'pre-commit-ci-update-config')
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 c2ebdaa

Please sign in to comment.