From 1f35408b639012337e1afae95ce2b0c7527fbc95 Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 24 Jan 2025 13:04:41 +0100 Subject: [PATCH 1/2] CI: Reject fixup commits --- .github/workflows/git.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/git.yml diff --git a/.github/workflows/git.yml b/.github/workflows/git.yml new file mode 100644 index 0000000..b97d6c9 --- /dev/null +++ b/.github/workflows/git.yml @@ -0,0 +1,15 @@ +on: pull_request + +name: Git checks + +jobs: + message-check: + name: Block Autosquash Commits + + runs-on: ubuntu-latest + + steps: + - name: Block Autosquash Commits + uses: skjnldsv/block-autosquash-commits-action@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} From f722289263a37990eb4b61ccf07c3a020d9a3399 Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 24 Jan 2025 13:24:21 +0100 Subject: [PATCH 2/2] CI: Replace action that doesn't understand unchangable old commits with oneliner that does --- .github/workflows/git.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/git.yml b/.github/workflows/git.yml index b97d6c9..7f7e16a 100644 --- a/.github/workflows/git.yml +++ b/.github/workflows/git.yml @@ -5,11 +5,11 @@ name: Git checks jobs: message-check: name: Block Autosquash Commits - runs-on: ubuntu-latest - steps: - - name: Block Autosquash Commits - uses: skjnldsv/block-autosquash-commits-action@v1 + - name: Check out riot-wrappers + uses: actions/checkout@v3 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + - name: Block Autosquash Commits + run: "! git log --oneline origin/main.. |grep 'fixup!\\|squash!\\|MERGE\\|DNM'"