TPT-4298: Added PR title checking to lint workflow and new clean up release notes workflow#913
TPT-4298: Added PR title checking to lint workflow and new clean up release notes workflow#913ezilber-akamai wants to merge 3 commits intolinode:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds GitHub Actions automation to enforce Jira-prefixed PR titles during CI and to post-process published release notes by removing Jira ticket prefixes from generated changelog entries.
Changes:
- Add a PR title validation step to the
lint-tidyCI job to enforceTPT-1234:prefix format. - Introduce a new
Clean Release Notesworkflow that runs on release publish and updates the release body to removeTPT-####:prefixes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Adds a CI step to validate PR title format before lint/tidy runs. |
.github/workflows/clean-release-notes.yml |
Adds a workflow to rewrite published release notes by stripping Jira-style prefixes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/ci.yml
Outdated
| GH_TOKEN: ${{ github.token }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| run: | | ||
| TITLE=$(gh pr view "$PR_NUMBER" --repo "$GITHUB_REPOSITORY" --json title --jq '.title') |
There was a problem hiding this comment.
I tried this initially. The issue was that ${{ github.event.pull_request.title }} does not update when you update the PR title, so rerunning the failed lint workflow with rerun failed jobs still failed even after fixing the PR title.
| } | ||
|
|
||
| // Remove prefixes like "TPT-1234: " (including after markdown bullet points) | ||
| body = body.replace(/TPT-\d+:\s*/g, ''); |
There was a problem hiding this comment.
We can do this if we want, but do we want the TPT-#### to show up anywhere in the release notes?
There was a problem hiding this comment.
Do not see value of leaving TPT anywhere in the release notes
mgwoj
left a comment
There was a problem hiding this comment.
One suggestion IMHO should be applied
📝 Description
Added a new step in the lint workflow to fail if the PR title does not begin with "TPT-1234:" (works with and without a space between the colon and description).
Also added a new workflow to run upon release publish to edit the release notes to remove the Jira ticket ID prefixes from patch notes.
✔️ How to Test
To test the PR title enforcement, edit the title of this PR to remove the Jira ticket ID and rerun the lint job. It should fail immediately. Then, add the Jira ticket ID back to the PR title and it should pass.
To test the release note cleanup job, check out this PR locally and merge it into your fork. Then, cut a test release to your fork. Upon generating the release notes, the TPT-**** prefix will still be there. Publish the release and verify that the new workflow is triggered. After it finishes, confirm that the release notes were correctly updated.