From 851c9349958b323cab5d0c2bbf228e23d0b65437 Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Thu, 21 May 2026 15:39:49 +0200 Subject: [PATCH 1/2] feat: PR title check action --- pr-title-check/README.md | 29 +++++++++++++++++++++++++++++ pr-title-check/action.yaml | 29 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 pr-title-check/README.md create mode 100644 pr-title-check/action.yaml diff --git a/pr-title-check/README.md b/pr-title-check/README.md new file mode 100644 index 0000000..b17c64c --- /dev/null +++ b/pr-title-check/README.md @@ -0,0 +1,29 @@ +# `pr-title-check` GitHub Action + +This action validates pull request titles by checking them for typos (using [typos](https://github.com/crate-ci/typos)) and verifying they follow the [Conventional Commits](https://www.conventionalcommits.org/) format (using [action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request)). + +The action checks out the repository so that any `_typos.toml` configuration present in the repo is respected. + +## Usage + +```yaml +name: CI (PR) + +on: + pull_request: + +permissions: + contents: read + pull-requests: read + +jobs: + pr-title-check: + name: PR title check + runs-on: ubuntu-latest + steps: + - uses: apify/actions/pr-title-check@main +``` + +### Inputs + +- `github-token` (optional, default `${{ github.token }}`) — Token used by the semantic PR title check to read PR metadata via the GitHub API. diff --git a/pr-title-check/action.yaml b/pr-title-check/action.yaml new file mode 100644 index 0000000..837ee5e --- /dev/null +++ b/pr-title-check/action.yaml @@ -0,0 +1,29 @@ +name: "PR title check" +description: "Check PR title for typos and conventional commit format" + +inputs: + github-token: + description: "GitHub token for the semantic PR title check" + required: false + default: ${{ github.token }} + +runs: + using: "composite" + steps: + - uses: actions/checkout@v4 + + - name: Write PR title to file + shell: bash + run: echo "$PR_TITLE" > /tmp/pr-title.txt + env: + PR_TITLE: ${{ github.event.pull_request.title }} + + - name: Spell-check PR title + uses: crate-ci/typos@master + with: + files: /tmp/pr-title.txt + + - name: Check PR title follows conventional commits + uses: amannn/action-semantic-pull-request@v6.1.1 + env: + GITHUB_TOKEN: ${{ inputs.github-token }} From 5a8a13bd50c16f44523be549910f88c91cb4c619 Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Fri, 22 May 2026 07:01:00 +0200 Subject: [PATCH 2/2] Update pr-title-check/action.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: František Nesveda --- pr-title-check/action.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/pr-title-check/action.yaml b/pr-title-check/action.yaml index 837ee5e..b3e295c 100644 --- a/pr-title-check/action.yaml +++ b/pr-title-check/action.yaml @@ -10,6 +10,7 @@ inputs: runs: using: "composite" steps: + # Needed to access `_typos.toml` from the repository - uses: actions/checkout@v4 - name: Write PR title to file