Repository navigation
Prevent Copilot co-author attribution in generated commit messages - #22948
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: sergiou87 <[email protected]>
sergiou87
left a comment
There was a problem hiding this comment.
Code looks good. Tested and works as expected
williammartin
left a comment
There was a problem hiding this comment.
Definitely better than today but a couple of questions.
Update the commit message system prompt so repo-provided constraints (e.g. custom instructions) can override the default no-Copilot-attribution guidance, instead of always forbidding a Co-authored-by: Copilot trailer. The JSON output format and no-markdown-wrapper rules remain non-negotiable. Adjust tests accordingly.
niik
left a comment
There was a problem hiding this comment.
I think this is good but there's also an option to disable this behavior in the Copilot session itself
/**
* When true, the runtime instructs the agent to include a `Co-authored-by`
* trailer in commit messages it composes.
*
* Defaults to `true`. Under {@link CopilotClientOptions.mode} = `"empty"`,
* defaults to `false`; apps can pass `true` here to opt back in.
*/
coauthorEnabled?: boolean;I'm thinking we should use that otherwise the agent will get conflicting instructions from the prompt
Set coauthorEnabled to false for Copilot commit-message sessions so the SDK does not inject its default co-author attribution guidance.
|
Ohhhh @niik I didn't know that existed! Thanks 🙇♂️ From what I see, when I've set it to Please take another look when you have a chance 🙏 |

Closes #22815
Description
Copilot intermittently adds a
Co-authored-by: Copilottrailer to generated commit descriptions, causing GitHub to credit it as a commit author.Screenshots
Not applicable; no UI changes.
Release notes
Notes: [Improved] Prevent Copilot from adding itself as a co-author to generated commit messages