From 66bf6d5ce922bb7d68eecec6115f436f2a6b2275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Volf?= <66163112+matous-volf@users.noreply.github.com> Date: Thu, 15 Aug 2024 12:09:21 +0200 Subject: [PATCH 1/2] ci: add a GitHub action for checking conventional pull requests --- .github/workflows/conventional-pull-requests.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/conventional-pull-requests.yml diff --git a/.github/workflows/conventional-pull-requests.yml b/.github/workflows/conventional-pull-requests.yml new file mode 100644 index 0000000..525552e --- /dev/null +++ b/.github/workflows/conventional-pull-requests.yml @@ -0,0 +1,15 @@ +name: conventional pull requests + +on: + pull_request: + types: [ opened, synchronize, reopened, edited ] + +jobs: + validate-pr-title: + runs-on: ubuntu-22.04 + steps: + - name: PR Conventional Commit Validation + uses: ytanikin/PRConventionalCommits@1.1.0 + with: + task_types: '["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]' + add_label: 'false' -- 2.47.1 From 00de1385307446bbf27d1428202e3b5f4e5e0fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Volf?= <66163112+matous-volf@users.noreply.github.com> Date: Thu, 15 Aug 2024 12:09:55 +0200 Subject: [PATCH 2/2] ci: make the commit check action run on pull requests based on the type --- .github/workflows/conventional-commits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index ab0894e..ae0e33e 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -2,7 +2,7 @@ name: conventional commits on: pull_request: - branches: [ main ] + types: [ opened, synchronize, reopened, edited ] jobs: build: -- 2.47.1