Skip to content

Commit 1e8ff32

Browse files
MarcoGorelliMarco Gorelli
authored andcommitted
autoupdate pre-commit versions (#37362)
Co-authored-by: Marco Gorelli <[email protected]>
1 parent 60071fe commit 1e8ff32

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Update pre-commit config"
2+
3+
on:
4+
schedule:
5+
- cron: "0 7 * * 1" # At 07:00 on each Monday.
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-pre-commit:
10+
if: github.repository_owner == 'pandas-dev'
11+
name: Autoupdate pre-commit config
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
- name: Cache multiple paths
17+
uses: actions/cache@v2
18+
with:
19+
path: |
20+
~/.cache/pre-commit
21+
~/.cache/pip
22+
key: pre-commit-autoupdate-${{ runner.os }}-build
23+
- name: Update pre-commit config packages
24+
uses: technote-space/create-pr-action@v2
25+
with:
26+
GITHUB_TOKEN: ${{ secrets.ACTION_TRIGGER_TOKEN }}
27+
EXECUTE_COMMANDS: |
28+
pip install pre-commit
29+
pre-commit autoupdate || (exit 0);
30+
pre-commit run -a || (exit 0);
31+
COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config"
32+
PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}"
33+
PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config"

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ repos:
1818
types: [text]
1919
args: [--append-config=flake8/cython-template.cfg]
2020
- repo: https://github.com/PyCQA/isort
21-
rev: 5.6.3
21+
rev: 5.6.4
2222
hooks:
2323
- id: isort
2424
name: isort (python)
2525
- id: isort
2626
name: isort (cython)
2727
types: [cython]
2828
- repo: https://github.com/asottile/pyupgrade
29-
rev: v2.7.2
29+
rev: v2.7.3
3030
hooks:
3131
- id: pyupgrade
3232
args: [--py37-plus]
@@ -124,7 +124,7 @@ repos:
124124
hooks:
125125
- id: yesqa
126126
- repo: https://github.com/pre-commit/pre-commit-hooks
127-
rev: v3.2.0
127+
rev: v3.3.0
128128
hooks:
129129
- id: end-of-file-fixer
130130
exclude: ^LICENSES/|\.(html|csv|txt|svg|py)$

0 commit comments

Comments
 (0)