Copilot Agent Jira integration, Branch/PR naming issues #188662
Replies: 2 comments
-
|
Someone asked something similar but not around the actual assigning of tasks and creating the job https://github.com/orgs/community/discussions/181529 |
Beta Was this translation helpful? Give feedback.
-
Copilot Coding Agent + Branch Protection Rules (Jira Integration)What's HappeningThe Copilot Coding Agent creates its branch before it reads any custom instructions. So by the time your org-level instruction is passed to the agent, the branch name violation has already occurred and the job is dead. Why Org-Level Instructions Don't Help HereOrg-level custom instructions are passed to the chat agent, not the job runner. The job runner that spins up the Copilot workspace branch is a separate process that doesn't read those instructions before acting. Current WorkaroundsOption 1 — Pre-create the branch manually (most reliable right now) Create the correctly named branch yourself before assigning to Copilot: bash This lets the Copilot runner create its branch freely, then you can rename or enforce via PR title instead. Option 3 — Relax the Regex Temporarily During Trial Since you're in a trial phase, consider switching branch protection to enforce naming at the PR level via a GitHub Action rather than at branch creation: yaml This moves enforcement to PR time — where Copilot's instructions can influence the process. What GitHub Needs to FixThis is a known gap. The job runner needs to:
Worth raising directly via the feedback button in Copilot or the GitHub Community forum to push priority on this. Recommended Approach for Your Trial
Step | Action
-- | --
Short term | Pre-create branches before assigning to Copilot
Medium term | Add Copilot as a bypass actor in your ruleset
Long term | Move naming enforcement to PR-level GitHub Action
What's Happening Why Org-Level Instructions Don't Help Here Current Workarounds Bypass list → Add bypass → Copilot (app) Option 3 — Relax the Regex Temporarily During Trial jobs: What GitHub Needs to Fix Read org/repo custom instructions before branch creation Worth raising directly via the feedback button in Copilot or the GitHub Community forum to push priority on this. Recommended Approach for Your Trial The core issue is a product gap, not a misconfiguration on your end. Pre-creating the branch is the cleanest workaround until GitHub adds pre-branch instruction support to the job runner. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Copilot Feature Area
Copilot Coding Agent
Body
We are trialling using Github Copilot integration with Jira. The issue I have is that we have branch protections on with a regex pattern enforcing tickets follow "feature/(jira-id)-(title)" or "bugfix/(jira-id)-(title)" (if the type is Bug or Defect).
I have placed a custom instruction at Organization level but that doesn't seem to be used when the job runner starts the agent.
When assigning the ticket to Copilot, how can we get it to follow the instruction? Within the chat window I have instructed it to use a branch, but the job runner seems to run first to create the branch for the agent to work out of then will pass the instruction to the agent which is too late.
Beta Was this translation helpful? Give feedback.
All reactions