From 11cbb641fa7a1f3c67d005cf43eb10e323d86d79 Mon Sep 17 00:00:00 2001 From: McQuenji <60017181+mcquenji@users.noreply.github.com> Date: Sat, 4 Jan 2025 19:27:15 +0100 Subject: [PATCH] ci: Add pr title validation --- .github/workflows/title_validation.yml | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/title_validation.yml diff --git a/.github/workflows/title_validation.yml b/.github/workflows/title_validation.yml new file mode 100644 index 00000000..6879ac5c --- /dev/null +++ b/.github/workflows/title_validation.yml @@ -0,0 +1,40 @@ +# See https://github.com/amannn/action-semantic-pull-request +name: 'PR Title is Conventional' + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + contents: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + permissions: + pull-requests: read + statuses: write + steps: + - uses: amannn/action-semantic-pull-request@505e44b4f33b4c801f063838b3f053990ee46ea7 # v4.6.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + build + chore + ci + docs + feat + fix + perf + refactor + revert + style + test + subjectPattern: ^[A-Z].+$ + subjectPatternError: | + The subject of the PR must begin with an uppercase letter.