diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml deleted file mode 100644 index cc53902c..00000000 --- a/.github/workflows/pre-commit.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: pre-commit -on: [push] -jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - fetch-depth: 0 - - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - uses: actions/cache@v4 - with: - path: | - ~/.cache/R/renv - key: r-precommit-cache|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - - name: Run pre-commit - uses: pre-commit/action@v3.0.1 - - name: Commit files - if: failure() && startsWith(github.ref, 'refs/heads') - run: | - if [[ `git status --porcelain --untracked-files=no` ]]; then - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git checkout -- .github/workflows - git commit -m "pre-commit" -a - fi - - name: Push changes - if: failure() && startsWith(github.ref, 'refs/heads') - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.ZS_PAT }} - branch: ${{ github.ref }} - env: - RENV_CONFIG_CACHE_ENABLED: FALSE - RENV_WATCHDOG_ENABLED: FALSE diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4913a8cf..ecad588b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -89,4 +89,13 @@ repos: args: ['--baseline', '.secrets.baseline'] exclude: package.lock.json ci: - autoupdate_schedule: monthly + autofix_commit_msg: | + [pre-commit.ci] auto fixes from pre-commit.com hooks + + for more information, see https://pre-commit.ci + autofix_prs: true + autoupdate_branch: '' + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' + autoupdate_schedule: weekly + skip: [] + submodules: false