ci: Add automated check for PR title formatting #17412
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request titles require a valid tag in order to determine in which changelog and which section they should be included. The text that follows is included in the changelog directly.
This means that PR titles must be formatted correctly, otherwise the changelog is useless.
Unfortunately I spend more time than I am comfortable with editing people's pull request titles to make sure the changelog makes sense and looks OK. I have previously posted a PSA with some guidance on the Discord channel, which helped, but not enough.
So I'm taking out the big guns: regex 😄
A simple check will make sure pull requests have the right formatting, otherwise the CI will fail and the PR will be labelled
title needs formatting
. If you check out the failed job, it will link you to relevant section of the contributing guide, which I updated to be extra clear.I realize this will probably cause some minor annoyance at first, but this should be in everyone's system soon enough. If you run into situations where you believe you have a valid PR title but the workflow fails, please ping me and I'll take a look.