summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2023-05-09 07:09:55 +0200
committerGitHub <noreply@github.com>2023-05-09 07:09:55 +0200
commite63bd7bc45447e93b2134d5185c393c057d6f390 (patch)
tree2d9ed7d3e504d24d7df8e64b6f298d42708746ce /.github
parent52dfe593670daff287df2f076d028a1400abb335 (diff)
Block fixup and squash commits
Signed-off-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/fixup.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml
new file mode 100644
index 000000000..596f2a28e
--- /dev/null
+++ b/.github/workflows/fixup.yml
@@ -0,0 +1,33 @@
+# This workflow is provided via the organization template repository
+#
+# https://github.com/nextcloud/.github
+# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
+
+name: Block fixup and squash commits
+
+on:
+ pull_request:
+ types: [opened, ready_for_review, reopened, synchronize]
+
+permissions:
+ contents: read
+
+concurrency:
+ group: fixup-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ commit-message-check:
+ if: github.event.pull_request.draft == false
+
+ permissions:
+ pull-requests: write
+ name: Block fixup and squash commits
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Run check
+ uses: xt0rted/block-autosquash-commits-action@79880c36b4811fe549cfffe20233df88876024e7 # v2
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}