From 2e8be83271d50d4b61119d5546040fdc50fb8461 Mon Sep 17 00:00:00 2001 From: Adam Ruberti Date: Thu, 23 May 2024 10:49:33 +0200 Subject: [PATCH] chore: add workflow for PR checks --- .github/workflows/pr.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..4ead895 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,31 @@ +--- +name: PR checks + +on: + pull_request: + types: + - opened + - edited + - synchronize + - reopened + - unlocked + +permissions: + contents: read + +jobs: + check-conventional-commit: + name: Check commit messages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "${{ github.event.pull_request.head.ref }}" + repository: "${{ github.event.pull_request.head.repo.full_name }}" + fetch-depth: 0 + - uses: actions/setup-python@v5 + with: + cache: "pip" # caching pip dependencies + - run: pip install commitizen + - name: Check commit messages + run: cz check --rev-range origin/${GITHUB_BASE_REF}..