Skip to content

feat: Add PR title linting - #299

Merged
Szelethus merged 2 commits into
Ericsson:mainfrom
furtib:PR-title-chack
Aug 24, 2026
Merged

feat: Add PR title linting#299
Szelethus merged 2 commits into
Ericsson:mainfrom
furtib:PR-title-chack

Conversation

@furtib

@furtib furtib commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Why:
We want to auto-tag every merged PR (maybe even auto-release). For this, we need PR titles (and maybe contents) to follow certain rules.

What:

  • Added a CI job to check if the PR title follows guidelines.

Addresses:
#47

@furtib
furtib requested a review from Szelethus August 19, 2026 10:08
@furtib furtib self-assigned this Aug 19, 2026
@furtib furtib added the CI 📦 label Aug 19, 2026

@Szelethus Szelethus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this is tricky to test, so I'm inclined to commit and see how it works. The only concern I have is related to breaking changes/major releases.

According to https://github.com/amannn/action-semantic-pull-request,

Note that since pull request titles only have a single line, you have to use ! to indicate breaking changes.

and I wonder whether https://github.com/mathieudutour/github-tag-action will pick up on that. Also, I just fear for the transparency of the whole thing. It'd be great if we could forecast whether the PR will be regarded as a patch/minor/major release (for instance, through automatic labeling).

Another option would be to test on a dummy repo.

@furtib

furtib commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

I'm testing it in a separate repo. I got this for a test PR:


Error: No release type found in pull request title "Test pr commit". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

These are case-sensitive!

The auto version increment picks up the feat mark only if merged with squash (we do this).
i tried !feat: ... for a breaking change PR, the linting worked but the version bump couldn't handle this case.

@Szelethus Szelethus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tried !feat: ... for a breaking change PR, the linting worked but the version bump couldn't handle this case.

While that is unfortunate, I think that is a tagging/versioning side fix anyways. I'm in favour of landing this now and ironing out kinks as they come.

Comment thread .github/workflows/pr-lint.yaml
Comment thread .github/workflows/pr-lint.yaml Outdated
@furtib furtib changed the title Feat: Add PR title linting feat: Add PR title linting Aug 24, 2026
@Szelethus
Szelethus merged commit ba752b0 into Ericsson:main Aug 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants