Skip to content

Commit 17ec77e

Browse files
committed
ci: Replace the pre-commit.ci app with github workflows
Since we're using the uv hook, pre-commit requires the internet to work properly which the pre-commit.ci app ran jobs don't have access to. These two workflows are meant to replace the app entirely by doing both checking on PRs/main and auto updates. It means that we do lose the autofix feature, but it's that or throwing away the uv-lock hook. Original work done in taskcluster/taskgraph#677 and taskcluster/taskgraph#678 Also ran uv sync to make pre-commit happy
1 parent b06354e commit 17ec77e

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Autoupdate
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 }}

.github/workflows/pre-commit.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: "Pre-commit"
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
jobs:
8+
pre-commit:
9+
name: Run pre-commit hooks
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: mozilla-releng/actions/pre-commit@main

.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

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)