From 5cd274a49c3f8e5d345bbcc608d82357770bc029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Wed, 28 Dec 2022 11:04:28 +0100 Subject: [PATCH] feat: fixup commits check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- .github/workflows/fixup.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/fixup.yml diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml new file mode 100644 index 0000000..b9e3920 --- /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: Pull request checks + +on: + pull_request: + types: [opened, ready_for_review, reopened] + +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 }}