Skip to content

Validate PR titles as conventional commits to avoid release-please dropping PRs #37

@davidpoblador

Description

@davidpoblador

Background

alltuner/mise-completions-sync hit this on PR #63: a PR with a non-conventional title was squash-merged, and release-please's commit parser rejected the squash subject:

❯ commit could not be parsed: <sha> Adopt vacant 0.3.0 release pipeline: crates.io + Homebrew tap (#63)
❯ error message: Error: unexpected token ' ' at 1:6, valid tokens [(, !, :]
❯ commits: 0
✔ Considering: 0 commits
✔ No commits for path: ., skipping

It was the only commit since the previous release, so release-please opened no release PR. The change just sat on main, invisible to the release pipeline.

Why this affects this repo

This repo uses release-please via .github/workflows/release.yml but has no PR title validation in CI. Squash-merge is enabled with squash_merge_commit_title: COMMIT_OR_PR_TITLE. A multi-commit PR with a non-conventional title becomes the squash subject and silently breaks the release pipeline.

The bug only surfaces visibly when a non-conventional PR is the sole change since the last release. Otherwise the bad commit gets silently dropped from the changelog and a release still happens — which is why this rarely surfaces but is still wrong.

Fix

Add a workflow that runs amannn/action-semantic-pull-request on PR open/edit to require a conventional-commit-shaped title. Allowed types should match the changelog-sections in .release-please-config.json.

Reference PR: alltuner/mise-completions-sync#64

Related

Org-wide audit; tracking issues filed at: alltuner/vacant#20, plus the rest of this audit batch (alltuner/{backstack,blogtuner,cookietuner,enrich-blogtuner,factoryfloor,gitcabin,infrastructure,nameplate,silicate,switchyard,vaultuner,vibetuner}, davidpoblador/{diafan,nextcat})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions