How to prevent Copilot Coding Agent from being the main author of commits in master #179983
Replies: 8 comments 8 replies
|
Right now, when you squash-and-merge a Copilot-created PR, GitHub sets the commit author to Copilot, which can mess up git blame and contribution history. A common workaround is to add a “Co-authored-by” line in the commit message so your name still shows. Another option is to amend the commit author locally after merging, but that’s more work for teams. It would be great if GitHub added a setting to let the requester be the primary author while keeping Copilot as co-author |
|
GitHub currently sets the commit author to “GitHub Copilot” because the Copilot Coding Agent creates the PR commits under its own identity. When you use Squash & Merge, GitHub keeps the author of the last commit — which ends up being Copilot. There’s no automatic way today to make the requester the author. Workaround Before merging the PR: Click “Squash and merge” Click “Change author” Select your GitHub user (Optional) Add this to the commit message to credit Copilot: |
|
I think there is no automatic way to fix the author, but manually update commit author: After merging, locally amend the author using |
|
I have an alternative idea. I haven't tried this yet, but in theory it should work:
This is a potential workaround, but tbh, GitHub should just get off their asses and do something about this. The limitations around Copilot and PRs feel arbitrary and unnecessary. Like the whole squashed commit author thing, or the fact that Copilot can only push changes to branches it made itself. Just get out of our way Github |
|
Any potential updates here? Ideally it would be whoever opened the agent session. I'm finding it very hard to manage on my team who is working/coordinate on what with git blame because in all the IDEs it shows copilot not the person who initiated the change. |
|
I have to agree, this has caused us a bit of grief as well, we have branch committer checks to ensure that the commits are using our domains to ensure cleanliness and attribution to who is doing changes. The copilot agent using a random xxxxxxxxx-Copilot@users.noreply.github.com is hard to track. Fun fact, we put in the instruction to change the email to one within our domain and the agent did actually do a git config command and changed the email.... the commit for the work did come from copilot@ourorg.com but the PR merge is still generated from the copilot identity. it would be good if we could specify what email it should use or if we could use patterns like requestor-github-username+copilot@users.noreply.github.com so we have some way to link it back? |
|
This is the most direct way to stop the behavior at the source.
Alternatively, add "git.addAICoAuthor": "off" to your settings.json Worked for me. |
|
Adding another angle to this same root problem which is usage attribution in We use a Unfortunately, all of the standard workflow context variables resolve to This means there is currently no way to identify the human who initiated the session from within the workflow itself: not through This is the same underlying gap as the commit authorship problem described in this thread. The human who initiated the Copilot session is simply not surfaced anywhere in the workflow context. |

Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
Question
Copilot Feature Area
Copilot Coding Agent
Body
When I use the GitHub Copilot Coding Agent to implement features (New Agent Task button), it creates a pull request (e.g., master <- copilot/my_new_feature).
After reviewing and iterating on the PR, when I merge it to master using "Squash and merge" via the GitHub UI, the resulting commit author is set to Copilot rather than the person who requested the task.
This creates issues for my workflow:
What I need:
Is there a way to ensure that when merging Copilot-created PRs, the person who requested the work becomes commit author, while still acknowledging Copilot's contribution?
Ideal outcome:
Either the requester becomes the primary author with Copilot as co-author, or there's a configurable setting to control this behavior during merge.
Has anyone else encountered this issue? Are there any workarounds or best practices for maintaining accurate attribution when using Copilot Coding Agent?
All reactions