From f19c6934b419423fe187a298a26294a5f5f007e8 Mon Sep 17 00:00:00 2001 From: Marco Gorelli Date: Sat, 18 Jun 2022 10:52:05 +0200 Subject: [PATCH] remove comment-bot --- .github/workflows/comment_bot.yml | 40 ------------------------- doc/source/development/contributing.rst | 8 +---- 2 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 .github/workflows/comment_bot.yml diff --git a/.github/workflows/comment_bot.yml b/.github/workflows/comment_bot.yml deleted file mode 100644 index 3824e015e8336..0000000000000 --- a/.github/workflows/comment_bot.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Comment-bot - -on: - issue_comment: - types: - - created - - edited - -jobs: - autotune: - name: "Fixup pre-commit formatting" - if: startsWith(github.event.comment.body, '@github-actions pre-commit') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: r-lib/actions/pr-fetch@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Cache multiple paths - uses: actions/cache@v3 - with: - path: | - ~/.cache/pre-commit - ~/.cache/pip - key: pre-commit-dispatched-${{ runner.os }}-build - - uses: actions/setup-python@v3 - with: - python-version: 3.8 - - name: Install-pre-commit - run: python -m pip install --upgrade pre-commit - - name: Run pre-commit - run: pre-commit run --from-ref=origin/main --to-ref=HEAD --all-files || (exit 0) - - name: Commit results - run: | - git config user.name "$(git log -1 --pretty=format:%an)" - git config user.email "$(git log -1 --pretty=format:%ae)" - git commit -a -m 'Fixes from pre-commit [automated commit]' || echo "No changes to commit" - - uses: r-lib/actions/pr-push@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/doc/source/development/contributing.rst b/doc/source/development/contributing.rst index 1d745d21dacae..e76197e302ca4 100644 --- a/doc/source/development/contributing.rst +++ b/doc/source/development/contributing.rst @@ -326,13 +326,7 @@ Autofixing formatting errors ---------------------------- We use several styling checks (e.g. ``black``, ``flake8``, ``isort``) which are run after -you make a pull request. If there is a scenario where any of these checks fail then you -can comment:: - - @github-actions pre-commit - -on that pull request. This will trigger a workflow which will autofix formatting -errors. +you make a pull request. To automatically fix formatting errors on each commit you make, you can set up pre-commit yourself. First, create a Python :ref:`environment