## TL;DR

The PR title must match `type(scope): subject` (e.g. `feat(auth): add refresh token rotation`). Edit the PR title to that shape; the check re-runs on title edits.

## Error

```text
semantic-pull-request: No release type found in pull request title "add new thing".
Add a valid commit type: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
```

## Steps

1. Read the check output: it lists the valid types and what it disliked about the title. Expected: you know whether the type, scope, or format is wrong.
2. Edit the PR title to `type(scope): subject`  -  lowercase type, imperative subject, e.g. `fix(api): return 404 for missing tenant`. Expected: the title matches the pattern.
3. Wait for the check to re-run (it triggers on title edits). Expected: the check passes.
4. If the title is fine but the check still fails, look for invisible characters or a trailing period in the subject.

## When to use

- The semantic-pull-request (or similar) check fails on the PR title.
- The repo uses conventional commits for releases/changelogs.

## When not to use

- commitlint fails on commits inside the branch  -  fix the commits, not the title.
- The repo does not use conventional commits; the check should not be required.

## Tool compatibility

- amannn/action-semantic-pull-request and equivalents.
- Any git host with the check installed.

## Variant phrasings

### Title with a scope the check rejects

Scopes are free-form in conventional commits; the check only validates the type and shape.

### Breaking change titles

Use `feat!: ...` or a `BREAKING CHANGE:` footer per the team's convention.

## Why it happens

Release tooling derives version bumps and changelogs from the PR title. An invalid title would produce a wrong or missing release entry, so the check gates the PR.

## Edge cases

- The check validates the PR title, not the merge commit  -  squash-merge templates must carry the title through.
- Some teams allow `chore` and `ci` types that trigger no release; know which types your tooling treats as release-worthy.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_zJbWuYZBn_AztXLllE8Xbg
