Skip to content

TPT-4298: Added PR title checking workflow and clean up release notes workflow#92

Merged
ezilber-akamai merged 3 commits intolinode:mainfrom
ezilber-akamai:TPT-4298-jira-id-in-prs
Apr 1, 2026
Merged

TPT-4298: Added PR title checking workflow and clean up release notes workflow#92
ezilber-akamai merged 3 commits intolinode:mainfrom
ezilber-akamai:TPT-4298-jira-id-in-prs

Conversation

@ezilber-akamai
Copy link
Copy Markdown
Contributor

📝 Description

Added a new 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 pr title validation 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds GitHub Actions automation to enforce Jira-style PR titles and to post-process published release notes by stripping ticket prefixes, improving consistency in PR metadata and readability of release notes.

Changes:

  • Introduces a PR-title validation workflow intended to enforce TPT-1234: prefixes (with label-based exemptions).
  • Introduces a release-published workflow that edits release notes to remove TPT-####: prefixes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/validate-pr-title.yml New workflow to validate PR title format/prefix and ignore certain labeled PRs.
.github/workflows/clean-release-notes.yml New workflow to update published release notes by removing ticket prefixes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +27
types: |
TPT-\d+
requireScope: false
# Override the default header pattern to allow hyphens and digits in the type
# (e.g. "TPT-4298: Description"). The default pattern only matches word
# characters (\w) which excludes hyphens.
headerPattern: '^([\w-]+):\s?(.*)$'
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

amannn/action-semantic-pull-request treats types as a set of literal allowed type strings (e.g. feat, fix), not a regex. With types: TPT-\d+, a real PR title like TPT-4298: ... will not match and the check will fail for every PR. Consider switching to a regex-based title check (e.g., via actions/github-script) or configure the action so the regex itself validates the prefix (and avoid relying on types for dynamic ticket IDs).

Suggested change
types: |
TPT-\d+
requireScope: false
# Override the default header pattern to allow hyphens and digits in the type
# (e.g. "TPT-4298: Description"). The default pattern only matches word
# characters (\w) which excludes hyphens.
headerPattern: '^([\w-]+):\s?(.*)$'
requireScope: false
# Enforce PR titles of the form "TPT-1234: Description" by requiring
# a TPT-<digits> prefix followed by a colon and a subject.
headerPattern: '^(TPT-\d+):\s?(.*)$'

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +28
// Remove ticket prefixes like "TPT-1234: " or "TPT-1234:"
body = body.replace(/TPT-\d+:\s*/g, '');
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The replacement regex /TPT-\d+:\s*/g will remove ticket strings anywhere in the release body, not just at the start of patch-note lines. This can unintentionally alter prose, code blocks, or references that legitimately mention a ticket ID mid-sentence. If the intent is to strip only line/item prefixes, anchor the match to the start of each line (multiline) and optionally allow common bullet prefixes (e.g. -, *, whitespace) so only patch-note entries are modified.

Suggested change
// Remove ticket prefixes like "TPT-1234: " or "TPT-1234:"
body = body.replace(/TPT-\d+:\s*/g, '');
// Remove ticket prefixes like "TPT-1234: " or "TPT-1234:" at the start of list lines
body = body.replace(/^[\s*-]*TPT-\d+:\s*/gm, '');

Copilot uses AI. Check for mistakes.
@ezilber-akamai ezilber-akamai merged commit fc98bee into linode:main Apr 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants