From 0678b82af0a1b100eaf16693da7e3341e7d1f7d7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 18:13:26 +0000 Subject: [PATCH 1/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.5 → v0.14.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.5...v0.14.9) - [github.com/astral-sh/uv-pre-commit: 0.9.9 → 0.9.17](https://github.com/astral-sh/uv-pre-commit/compare/0.9.9...0.9.17) - [github.com/executablebooks/mdformat: 0.7.22 → 1.0.0](https://github.com/executablebooks/mdformat/compare/0.7.22...1.0.0) - [github.com/executablebooks/mdformat: 0.7.22 → 1.0.0](https://github.com/executablebooks/mdformat/compare/0.7.22...1.0.0) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 838b75a9..fa721375 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,16 +25,16 @@ repos: - id: python-no-log-warn - id: text-unicode-replacement-char - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.5 + rev: v0.14.9 hooks: - id: ruff-format - id: ruff-check - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.9.9 + rev: 0.9.17 hooks: - id: uv-lock - repo: https://github.com/executablebooks/mdformat - rev: 0.7.22 + rev: 1.0.0 hooks: - id: mdformat additional_dependencies: [ @@ -44,7 +44,7 @@ repos: ] files: (README\.md) - repo: https://github.com/executablebooks/mdformat - rev: 0.7.22 + rev: 1.0.0 hooks: - id: mdformat additional_dependencies: [ From 1896cea2555e5710500703f904143e4995da4fab Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Thu, 18 Dec 2025 09:10:04 +0100 Subject: [PATCH 2/6] fix --- .github/workflows/automerge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 7f35b34f..b472c385 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -5,6 +5,7 @@ on: permissions: contents: write + pull-requests: write jobs: auto-merge: From 0254c693df54946bfa9e89f992753249cbd92bde Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Thu, 18 Dec 2025 16:45:10 +0100 Subject: [PATCH 3/6] Update. --- .github/workflows/automerge.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index b472c385..a2f76c24 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,7 +1,5 @@ -name: Dependabot and Pre-commit auto-merge - -on: - pull_request: +name: Auto-merge bot PRs +on: pull_request permissions: contents: write @@ -10,12 +8,18 @@ permissions: jobs: auto-merge: runs-on: ubuntu-latest - if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' }} + if: > + github.repository == 'pytask-dev/pytask' && + (github.event.pull_request.user.login == 'dependabot[bot]' || + github.event.pull_request.user.login == 'pre-commit-ci[bot]') steps: - - name: Enable auto-merge for Dependabot and pre-commit-ci PRs - run: | - gh pr review --approve "$PR_URL" - gh pr merge --auto --merge "$PR_URL" + - name: Approve PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Enable auto-merge + run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 09f763f785ad4945270860c2d6d85b056805e1f3 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Thu, 18 Dec 2025 16:47:29 +0100 Subject: [PATCH 4/6] Fix. --- .github/workflows/automerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index a2f76c24..7d0bab3e 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -19,7 +19,7 @@ jobs: PR_URL: ${{ github.event.pull_request.html_url }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Enable auto-merge - run: gh pr merge --auto --merge "$PR_URL" + run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 15b78dc04fee01322c2fff9165bf45ec05520386 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Thu, 18 Dec 2025 16:51:12 +0100 Subject: [PATCH 5/6] revert. --- .github/workflows/automerge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 7d0bab3e..be85b70d 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -17,9 +17,9 @@ jobs: run: gh pr review --approve "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.AUTO_MERGE_TOKEN }} - name: Enable auto-merge run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.AUTO_MERGE_TOKEN }} From 94cf6b9627c029eee5ef8717b4abe6536fe63db8 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Thu, 18 Dec 2025 16:52:29 +0100 Subject: [PATCH 6/6] Remove. --- .github/workflows/automerge.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/automerge.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml deleted file mode 100644 index be85b70d..00000000 --- a/.github/workflows/automerge.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Auto-merge bot PRs -on: pull_request - -permissions: - contents: write - pull-requests: write - -jobs: - auto-merge: - runs-on: ubuntu-latest - if: > - github.repository == 'pytask-dev/pytask' && - (github.event.pull_request.user.login == 'dependabot[bot]' || - github.event.pull_request.user.login == 'pre-commit-ci[bot]') - steps: - - name: Approve PR - run: gh pr review --approve "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GH_TOKEN: ${{ secrets.AUTO_MERGE_TOKEN }} - - name: Enable auto-merge - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GH_TOKEN: ${{ secrets.AUTO_MERGE_TOKEN }}