Add support for copilot/fix branch naming convention #1146
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.
This PR extends the
enforce-pr-conventions
action to support GitHub Copilot-generated branch names that follow thecopilot/fix*
pattern, addressing the need for automated fix branches that don't contain Jira keys in their names.Problem
Previously, branches like
copilot/fix-bug-123
orcopilot/fix-aja
would be rejected by the PR validation, forcing developers to manually rename Copilot-generated branches to follow traditional naming conventions likefix/JKEY-12345-description
.Solution
Modified the default branch validation regex to include
copilot/fix*
patterns while maintaining all existing validation requirements:Before:
After:
Key Features
copilot/fix*
branches are supported (not other copilot branch types)copilot/fix-bug-123
,copilot/fix-aja
, or simplycopilot/fix
Examples
Now Accepted:
Still Rejected (as intended):
Changes Made
enforce-pr-conventions
actionTesting
This change enables seamless integration of GitHub Copilot-generated fix branches while preserving all existing quality controls and validation requirements.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com
/usr/lib/apt/methods/https
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.