Skip to content

Commit

Permalink
ci: Add pre-commit automerge job
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 6, 2024
1 parent 20b2058 commit 6456bf4
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 23 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
precommit:
if: ${{ github.event.pull_request.user.login == 'pre-commit-ci[bot]' }}
runs-on: ubuntu-latest
steps:
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr review --approve ${{ github.event.pull_request.html_url }}
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ repos:
rev: 0.4.4
hooks:
- id: pip-compile
name: pip-compile requirements_test.in
args: [requirements_test.in, -o, requirements_test.txt]
files: ^requirements_test\.(in|txt)$
name: pip-compile requirements_dev.in
args: [requirements_dev.in, -o, requirements_dev.txt]
files: ^requirements_dev\.(in|txt)$
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
1 change: 1 addition & 0 deletions requirements_test.in → requirements_dev.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pre-commit
pytest
requests
38 changes: 38 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This file was autogenerated by uv via the following command:
# uv pip compile requirements_dev.in -o requirements_dev.txt
certifi==2024.7.4
# via requests
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.1.0
# via requests
distlib==0.3.8
# via virtualenv
filelock==3.15.4
# via virtualenv
identify==2.6.0
# via pre-commit
idna==3.7
# via requests
iniconfig==1.1.1
# via pytest
nodeenv==1.9.1
# via pre-commit
packaging==24.1
# via pytest
platformdirs==4.2.2
# via virtualenv
pluggy==1.5.0
# via pytest
pre-commit==3.8.0
# via -r requirements_dev.in
pytest==8.3.2
# via -r requirements_dev.in
pyyaml==6.0.2
# via pre-commit
requests==2.32.3
# via -r requirements_dev.in
urllib3==2.2.2
# via requests
virtualenv==20.26.3
# via pre-commit
20 changes: 0 additions & 20 deletions requirements_test.txt

This file was deleted.

0 comments on commit 6456bf4

Please sign in to comment.