Skip to content

ci: Check that PR titles follow Conventional Commits - #799

Open
anakinj wants to merge 1 commit into
jwt:mainfrom
anakinj:ci/conventional-pr-titles
Open

anakinj wants to merge 1 commit into
jwt:mainfrom
anakinj:ci/conventional-pr-titles

Conversation

@anakinj

@anakinj anakinj commented Nov 24, 2026

Copy link
Copy Markdown
Member

Description

First step of #785, releasing with release-please. Pull requests are squash merged with the title as the commit message, and release-please builds the changelog and picks the next version from those messages, so titles need to follow Conventional Commits.

  • .github/workflows/pr_title.yml fails a pull request whose title doesn't match type(scope)!: description. The types are feat, fix, perf, refactor, docs, test, ci, build, chore and revert. It runs with no token permissions and passes the title through an environment variable, not into the script.
  • Dependabot gets the ci prefix, so its GitHub Actions bumps pass the check and stay out of the changelog.
  • CONTRIBUTING.md and the PR template describe the format and which types lead to which release.
  • README.md: the "Releasing" section still described rake release:source_control_push, which Document the actual release process #764 replaced. It now links to the release section in CONTRIBUTING.md.

The changelog-row requirement stays for now. It's removed by the release-please change itself, so nothing is lost in between.

After merging, the "Conventional Commits" check should be made a required status check on main.

Checklist

  • There are tests for the fix or feature added/changed. Not applicable: CI only. The title pattern was checked against the titles above and Dependabot's ci: format.

Posted by Claude on behalf of @anakinj.

Pull requests are squash merged with the PR title as the commit message.
Conventional titles make that history usable by release-please, which
is the planned way to generate the changelog and cut releases.

Dependabot titles get a ci prefix so they pass the check, and the stale
release instructions in the README now point to CONTRIBUTING.
anakinj added a commit to anakinj/ruby-jwt that referenced this pull request Nov 24, 2026
Releasing took a version bump after every release, a changelog row in
every pull request, and a hand-made tag and GitHub release. release-please
does all of it from the pull request titles, which jwt#799 requires to
follow Conventional Commits. It keeps a release pull request open, and
merging it tags the release, creates the GitHub release and publishes the
gem.

The manifest starts at 3.3.1, the last release made the old way.
lib/jwt/version.rb keeps its MAJOR, MINOR and TINY constants, which the
Ruby updater does not rewrite, so the lines carry the generic updater's
annotations instead. The changelog sections keep the Features and Fixes
and enhancements headings, and hide refactor, docs, test, ci, build and
chore pull requests.

The release job calls push_gem.yml rather than publishing itself, so the
tag check, build, push and wait steps stay in one place. A tag created
with GITHUB_TOKEN does not trigger other workflows, so the call is what
publishes it. push_gem.yml checks out and verifies the given tag, since
GITHUB_REF_NAME is main when it is called. It can also be run by hand to
publish an existing tag again. The tag trigger stays for 2.x, which is
still released by hand from 2-10-stable.

CONTRIBUTING.md and the pull request template drop the changelog row,
and the release section describes the new process.

Refs jwt#785
@anakinj anakinj mentioned this pull request Nov 24, 2026
2 tasks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant