From 1dabacafe840d93051531e63df9e913047e20a21 Mon Sep 17 00:00:00 2001 From: "Reid D. McKenzie" Date: Fri, 6 Jun 2025 14:05:29 -0600 Subject: [PATCH 1/2] Automate pre-commit runs --- .github/workflows/ci.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e29aecf1..0b9d0e3c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,9 +41,33 @@ jobs: pre-commit: runs-on: ubuntu-latest + if: always() steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} - uses: pre-commit/action@v3.0.1 + inputs: + extra_args: '--to-ref=HEAD --from-ref=${{ github.base_ref }}' + - name: Send automated commit + run: | + if ! git diff --quiet; then + git commit \ + --author="aspect-marvin[bot] " \ + --all \ + --message="Format" + + for backoff in 5 10 15 20 25 30 runout; do + if ! git push; then + sleep $backoff + elif [ "$backoff" = "runout" ]; then + echo "ERROR: Failed to push commits!" >&2 + exit 1 + else + break + fi + done + fi verify-bcr-patches: runs-on: ubuntu-latest From 781e6da30d6924535477d938f3e751288beef731 Mon Sep 17 00:00:00 2001 From: Reid D McKenzie Date: Fri, 6 Jun 2025 14:14:45 -0600 Subject: [PATCH 2/2] The magic word is with --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0b9d0e3c..71461e07 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -47,7 +47,7 @@ jobs: with: ref: ${{ github.head_ref }} - uses: pre-commit/action@v3.0.1 - inputs: + with: extra_args: '--to-ref=HEAD --from-ref=${{ github.base_ref }}' - name: Send automated commit run: |