-
Notifications
You must be signed in to change notification settings - Fork 66
ci: added jira key enforcement for pr #2866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: added jira key enforcement for pr #2866
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, no comments
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changesNo lines with coverage information in this diff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is only run for pull requests, would a fallback to the PR title also suffice? It also allows us to connect the PR and Jira issue but is less effort that renaming the branch.
6f76ca0
to
cecf288
Compare
a66a2f5
to
35deb34
Compare
@frederikschubertflex I have added the fallback to the PR-title |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mahlau-flex! I think this is good, but just noticed it will conflict with dependabot: https://github.com/flexcompute/tidy3d/pull/2801/commits
We should add an exemption for daily-chore/
too.
35deb34
to
128931d
Compare
I have added the daily-chore exemption 👍 |
Added a new job to the github CI pipeline, which checks if the branch name contains a Jira key. Currently, this check runs only in the pull-request phase (I am not sure if this is correct or the check should also be applied in other stages).
The check can be overriden if the branch name starts with "hotfix" or "chore".
Greptile Overview
Updated On: 2025-10-06 13:00:32 UTC
Summary
This PR adds a GitHub Actions workflow job that enforces Jira issue key requirements in branch names during pull requests. The implementation introduces a new `lint-branch-name` job that validates branch names contain a Jira key pattern (`[A-Z]{2,}-[0-9]+`) while allowing exemptions for branches starting with "hotfix" or "chore".The job integrates seamlessly with the existing CI pipeline by adding itself to the workflow dependencies and failure conditions. It extracts the branch name from GitHub's context (
github.head_ref
), performs case-insensitive prefix checking for exemptions, and uses bash regex matching to validate the Jira pattern. The implementation only runs during pull request events (github.event_name == 'pull_request'
), ensuring it doesn't interfere with merge operations or other workflow triggers.This change supports development governance by ensuring all feature work can be traced back to specific Jira tickets, improving project management and change tracking capabilities. The exemption system acknowledges that emergency fixes and maintenance work may not always require formal ticket creation.
PR Description Notes:
Important Files Changed
Changed Files
.github/workflows/tidy3d-python-client-tests.yml
Confidence score: 4/5
Sequence Diagram
Context used:
Rule from
dashboard
- Do not use markdown formatting in exception or warning messages; use single quotes to highlight vari... (source)