Skip to content

Commit 88adbc5

Browse files
authored
Add a workflow to run auto updates for pre-commit (#678)
* Add a workflow to run auto updates for pre-commit This replaces the pre-commit.ci app's autoupdate. The one caveat with this is that it doesn't check for PRs that are already opened on that branch. I did that to keep it as simple as possible. It's not a real issue as github will detect that and close the previous PR and then open a new one but it might be a bit spammy if we don't merge those PRs * Use `autofix_commit_msg` and remove now useless fields * Use the commit msg as the PR title too * Switch to our releng/actions repo
1 parent f85ff32 commit 88adbc5

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Auto update pre-commit hooks every month
2+
on:
3+
schedule:
4+
- cron: '0 0 1 * *'
5+
jobs:
6+
pre-commit:
7+
name: Pre-commit
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
steps:
13+
- uses: mozilla-releng/actions/pre-commit-autoupdate@main
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}

.pre-commit-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
---
44
ci:
5-
autofix_commit_msg: "style: pre-commit.ci auto fixes [...]"
65
autoupdate_commit_msg: "chore: pre-commit autoupdate"
7-
autoupdate_schedule: monthly
86
repos:
97
- repo: https://github.com/pre-commit/pre-commit-hooks
108
rev: v5.0.0

0 commit comments

Comments
 (0)