Repository navigation
fix(tickets): skip date prefixes in branch issue numbers - #4959
Merged
IsmaelMartinez merged 1 commit intoNov 15, 2026
Merged
IsmaelMartinez merged 1 commit into
IsmaelMartinez merged 1 commit into
Conversation
A branch such as release/2026-11-15 or deploy/2025-03 matched the default branch pattern, so /review fetched issue The-PR-Agent#2026 or The-PR-Agent#2025 and checked the PR against an unrelated ticket. The default pattern now skips a year followed by a month. Other numbers keep the documented rule, including ambiguous ones such as 2024-upgrade-deps.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
⚙️ Agent run details
|
PR Code Suggestions ✨No code suggestions found for the PR. ⚙️ Agent run details
|
IsmaelMartinez
approved these changes
Nov 15, 2026
IsmaelMartinez
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for fixing date-named branches being read as issue numbers: I confirmed the new date cases fail on main and pass here, that 2024-upgrade-deps, feature/42-2026-11-15 and 2026-11/123-fix keep their documented issues, and that the added lookahead stays linear when I double adversarial inputs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
User description
A PR from a date-named branch such as
release/2026-11-15ordeploy/2025-03matched the default branch issue pattern. Withextract_issue_from_branchon by default,/reviewfetched issue #2026 or #2025 and checked the PR against an unrelated ticket.The default pattern now skips a year (19xx or 20xx) followed by a month (01-12) at the start of a branch segment, also when a
/,.or_follows, as indeploy/2025-03/eu. Everything else keeps the documented rule:123-fix,feature/42-2026-11-15and2026-11/123-fixstill link #123, #42 and #123, and an ambiguous name such as2024-upgrade-depsstill links #2024. A custombranch_issue_regexis not affected. The configuration comment and the generated reference mention the exception.The open GitLab branch inference in #4911 uses its own pattern, so it would need the same exception if it lands. That PR also edits the
branch_issue_regexcomment, so whichever merges second has a small text conflict there.Validation:
tests/unittest/test_extract_issue_from_branch.py: five date branches return no issue, and four non-date branches keep their issue. The date cases fail onmain.PYTHONPATH=. uv run pytest -q tests/unittest: 18,581 passed, 66 skipped.PR Type
Bug fix, Tests, Documentation
Description
Exclude date prefixes from branch issue extraction.
Preserve valid issue numbers and custom patterns.
Add regression tests and update configuration documentation.
File Walkthrough
ticket_pr_compliance_check.py
Exclude date prefixes from default branch issue matchingpr_agent/commands/ticket_pr_compliance_check.py
default branch issue pattern.
branch end.
unchanged.
test_extract_issue_from_branch.py
Cover date exclusions and preserved branch issue extractiontests/unittest/test_extract_issue_from_branch.py
legitimate issue numbers.
configuration_reference.md
Document date-prefix exclusion in the configuration referencedocs/docs/usage-guide/configuration_reference.md
branch_issue_regexreference to document defaultdate-prefix exclusion.
configuration.toml
Clarify default branch issue pattern configuration commentspr_agent/settings/configuration.toml
branch_issue_regexpattern skips dateprefixes.
⚙️ Agent run details