From ba91255d347fca4943821fb2cc6c439b1cc09f98 Mon Sep 17 00:00:00 2001 From: hasansezertasan Date: Fri, 24 Jul 2026 15:43:53 +0300 Subject: [PATCH] ci: add PR title linting (Conventional Commits) Add .github/workflows/pr-title.yml validating PR titles as Conventional Commits via amannn/action-semantic-pull-request. SHA-pinned, least-privilege (pull-requests: read), and reads the title via the API only so the pull_request_target trigger stays safe. Adapted from litestar-org/project-template#16. Closes #41 --- .github/workflows/pr-title.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pr-title.yml diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml new file mode 100644 index 0000000..e3a59f0 --- /dev/null +++ b/.github/workflows/pr-title.yml @@ -0,0 +1,24 @@ +name: Lint PR Title + +on: + pull_request: + types: + - opened + - edited + - synchronize + +permissions: {} + +jobs: + validate: + name: Validate PR title + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + # Title validation needs no write token, so plain pull_request (rather + # than pull_request_target) is used - safer, and avoids running with a + # privileged token on fork PRs. + - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}