Branch name / PR title rules #181529
-
Select Topic AreaQuestion Copilot Feature AreaCopilot Coding Agent BodyI don't see any possibility of instructing an agent to follow some branch naming rules. Also, there is no way of following some practices of PR titles. Do I miss something? https://docs.github.com/en/copilot/reference/custom-agents-configuration |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
You’re not missing anything — currently Copilot agents cannot strictly enforce branch naming conventions or PR title rules. The Custom Agent configuration allows you to provide guidance, examples, and preferred patterns, but it will not block or validate actions when those rules are not followed. If you need actual enforcement today, that still has to be done using GitHub platform features such as: Branch protection rules PR templates (with required format placeholders) GitHub Actions/CI checks (e.g., regex validation on branch names or titles) For example, a simple CI check can reject PRs if the branch name doesn't follow the required format. In summary: Copilot can follow instructions when generating names or PR descriptions, but it cannot enforce compliance. Enforcement currently needs to be implemented outside of the agent. |
Beta Was this translation helpful? Give feedback.
-
|
In my team we use Jira for project planning. When I start tasks in Copilot Coding Agent, I do it with the following prompt: Please solve jira task XX-YYYY and include the jira task id in PR title. This always makes branches that included the jira task id in its name. This allows jira to detect the PR and branch automaticly. Hope it can help you forward |
Beta Was this translation helpful? Give feedback.
You’re not missing anything — currently Copilot agents cannot strictly enforce branch naming conventions or PR title rules. The Custom Agent configuration allows you to provide guidance, examples, and preferred patterns, but it will not block or validate actions when those rules are not followed.
If you need actual enforcement today, that still has to be done using GitHub platform features such as:
Branch protection rules
PR templates (with required format placeholders)
GitHub Actions/CI checks (e.g., regex validation on branch names or titles)
For example, a simple CI check can reject PRs if the branch name doesn't follow the required format.
In summary: Copilot can follow instructions w…