Skip to content

Commit

Permalink
autoupdate pre-commit versions (#37362)
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Gorelli <m.gorelli@samsung.com>
  • Loading branch information
2 people authored and pull[bot] committed Dec 28, 2021
1 parent 60071fe commit 1e8ff32
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/autoupdate-pre-commit-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Update pre-commit config"

on:
schedule:
- cron: "0 7 * * 1" # At 07:00 on each Monday.
workflow_dispatch:

jobs:
update-pre-commit:
if: github.repository_owner == 'pandas-dev'
name: Autoupdate pre-commit config
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
~/.cache/pre-commit
~/.cache/pip
key: pre-commit-autoupdate-${{ runner.os }}-build
- name: Update pre-commit config packages
uses: technote-space/create-pr-action@v2
with:
GITHUB_TOKEN: ${{ secrets.ACTION_TRIGGER_TOKEN }}
EXECUTE_COMMANDS: |
pip install pre-commit
pre-commit autoupdate || (exit 0);
pre-commit run -a || (exit 0);
COMMIT_MESSAGE: "⬆️ UPGRADE: Autoupdate pre-commit config"
PR_BRANCH_NAME: "pre-commit-config-update-${PR_ID}"
PR_TITLE: "⬆️ UPGRADE: Autoupdate pre-commit config"
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ repos:
types: [text]
args: [--append-config=flake8/cython-template.cfg]
- repo: https://github.com/PyCQA/isort
rev: 5.6.3
rev: 5.6.4
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
rev: v2.7.3
hooks:
- id: pyupgrade
args: [--py37-plus]
Expand Down Expand Up @@ -124,7 +124,7 @@ repos:
hooks:
- id: yesqa
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v3.3.0
hooks:
- id: end-of-file-fixer
exclude: ^LICENSES/|\.(html|csv|txt|svg|py)$
Expand Down

0 comments on commit 1e8ff32

Please sign in to comment.