From f8d7e9c34721cf19d6592a54daa030615854b5f4 Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Mon, 2 Dec 2024 03:53:39 -0500 Subject: [PATCH 1/2] fix: pre-commit auto update permissions Signed-off-by: Maryam Tahhan --- .github/workflows/pre-commit-auto-update.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pre-commit-auto-update.yml b/.github/workflows/pre-commit-auto-update.yml index 5c766196..21a2edcf 100644 --- a/.github/workflows/pre-commit-auto-update.yml +++ b/.github/workflows/pre-commit-auto-update.yml @@ -2,6 +2,11 @@ name: Pre-commit auto-update on: # yamllint disable-line rule:truthy schedule: - cron: 0 0 1 * * + +permissions: + contents: write + pull-requests: write + jobs: auto-update: runs-on: ubuntu-latest @@ -11,15 +16,18 @@ jobs: uses: actions/setup-python@v5 - name: Install pre-commit run: pip install pre-commit - - name: Run pre-commit autoupdate - run: pre-commit autoupdate + - name: Run pre-commit auto update + run: pre-commit auto update - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} - branch: update/pre-commit-autoupdate + branch: pre-commit-auto-update title: Auto-update pre-commit hooks commit-message: Auto-update pre-commit hooks + committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> + sign-commits: true body: | Update pre-commit hooks to latest version - labels: dependencies + draft: false From 279647a18a575975b98326d0fd2de45a7f523db0 Mon Sep 17 00:00:00 2001 From: Maryam Tahhan Date: Mon, 2 Dec 2024 07:20:21 -0500 Subject: [PATCH 2/2] chore: allow pre-commit auto update manual trigger Signed-off-by: Maryam Tahhan --- .github/workflows/pre-commit-auto-update.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pre-commit-auto-update.yml b/.github/workflows/pre-commit-auto-update.yml index 21a2edcf..c2bc861a 100644 --- a/.github/workflows/pre-commit-auto-update.yml +++ b/.github/workflows/pre-commit-auto-update.yml @@ -1,5 +1,6 @@ name: Pre-commit auto-update on: # yamllint disable-line rule:truthy + workflow_dispatch: schedule: - cron: 0 0 1 * *