Repository navigation
fix(#3069): reject placeholder JIRA keys in PR title checker #3073
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
base: main
Are you sure you want to change the base?
Changes from all commits
3d4cd80
a7afa21
c6311de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,20 +4,11 @@ | |
| "color": "EEEEEE" | ||
| }, | ||
| "CHECKS": { | ||
| "prefixes": [ | ||
| "LCORE-", | ||
| "RSPEED-", | ||
| "MGTM-", | ||
| "OLS-", | ||
| "RHIDP-", | ||
| "LEADS-", | ||
| "CWFHEALTH-", | ||
| "[release/" | ||
| ] | ||
| "regexp": "^(LCORE|RSPEED|MGTM|OLS|RHIDP|LEADS|CWFHEALTH)-[1-9]\\d*[: ]|^\\[release/" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [medium] pattern-inconsistency The regex enforces a [: ] delimiter (colon or space) immediately after the issue number, but none of the four documentation files (AGENTS.md, CONTRIBUTING.md, contributing_guidelines.md, contributing_guide.md) mention this requirement. A title like LCORE-1234-fix-bug would be silently rejected by the regex despite appearing to satisfy the documented rules. Suggested fix: Either add a note to the documentation (e.g. The JIRA key must be followed by a colon or space) or relax the regex delimiter. |
||
| }, | ||
| "MESSAGES": { | ||
| "success": "All OK", | ||
| "failure": "Failing CI test", | ||
| "failure": "Failing CI test — PR title must start with a valid JIRA key (e.g. LCORE-1234) or [release/", | ||
| "notice": "" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -412,11 +412,18 @@ uv run make test-e2e # End-to-end tests | |
|
|
||
| ## Pull Request Requirements | ||
|
|
||
| **PR titles MUST start with a JIRA issue key prefix.** CI enforces this via `pr-title-checker` (config: `.github/pr-title-checker-config.json`). | ||
| **PR titles MUST start with a valid JIRA issue key (project prefix + non-zero issue number).** CI enforces this via `pr-title-checker` (config: `.github/pr-title-checker-config.json`). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] doc-style The updated text says Placeholder keys like LCORE-0000 or LCORE-0 are rejected, but the regexp also rejects keys with leading zeros (e.g. LCORE-0123). Minor documentation omission. |
||
|
|
||
| Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHIDP-`, `LEADS-`, `CWFHEALTH-`, `[release/` | ||
| - Allowed project prefixes: `LCORE`, `RSPEED`, `MGTM`, `OLS`, `RHIDP`, `LEADS`, `CWFHEALTH` | ||
| - The issue number after the prefix must be a positive integer (e.g. `LCORE-1234`) | ||
| - Placeholder keys like `LCORE-0000` or `LCORE-0` are rejected, as are keys with leading zeros (e.g. `LCORE-0123`) | ||
| - The JIRA key must be followed by a colon or space (e.g. `LCORE-1234: description` or `LCORE-1234 description`) | ||
| - Release branch PRs may use the `[release/` prefix instead | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] doc-style The Allowed project prefixes block is a single ~330-character paragraph packing three separate constraints (valid prefixes, positive-integer rule, leading-zero rejection) into one run-on sentence, whereas surrounding AGENTS.md sections use short bullet lists or numbered lists. |
||
| - ✅ `RSPEED-2849: add user_agent to ResponsesEventData` | ||
| - ✅ `[release/0.8] cherry-pick fix` | ||
| - ❌ `LCORE-0000: placeholder key` | ||
| - ❌ `LCORE-1234-fix-bug` (missing colon or space after the key) | ||
| - ❌ `feat(observability): add user_agent to ResponsesEventData` | ||
|
|
||
| ## Development Workflow | ||
|
|
||
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.
[medium] pattern-inconsistency
The regexp requires [: ] immediately after the issue number, so a bare key like LCORE-123 with no trailing colon or space is rejected. This is stricter than the old prefixes mode. Ensure this is intentional.
Suggested fix: If bare JIRA keys without a description should be allowed, change [: ] to ([: ]|$) in the regexp.