Skip to content

Prevent Copilot co-author attribution in generated commit messages - #22948

Merged
sergiou87 merged 6 commits into
developmentfrom
copilot/fix-copilot-commit-description
Sep 30, 2026
Merged

sergiou87 merged 6 commits into
developmentfrom
copilot/fix-copilot-commit-description

Conversation

Copilot AI commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #22815

Description

Copilot intermittently adds a Co-authored-by: Copilot trailer to generated commit descriptions, causing GitHub to credit it as a commit author.

  • Prompt: Instruct Copilot not to add a co-author trailer or otherwise attribute the commit to itself.
  • Coverage: Check that the instruction is present with and without repository rules.

Screenshots

Not applicable; no UI changes.

Release notes

Notes: [Improved] Prevent Copilot from adding itself as a co-author to generated commit messages

Copilot AI balanced review requested due to automatic review settings September 29, 2026 11:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI changed the title [WIP] Fix issue with extra Copilot co-author description Prevent Copilot co-author attribution in generated commit messages Sep 29, 2026
Copilot AI requested a review from sergiou87 September 29, 2026 12:03
@sergiou87
sergiou87 marked this pull request as ready for review September 29, 2026 15:08
@sergiou87
sergiou87 requested a review from a team as a code owner September 29, 2026 15:08
@sergiou87
sergiou87 requested a balanced review from Copilot September 29, 2026 15:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The instruction does not reach the legacy generation path, which can still produce the reported attribution.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

Comment thread app/src/lib/stores/copilot-store.ts Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused prompt change has coverage for both intended configurations, with no unresolved findings.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@sergiou87 sergiou87 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. Tested and works as expected

@sergiou87
sergiou87 requested review from a team, babakks and niik September 29, 2026 15:25
williammartin
williammartin previously approved these changes Sep 29, 2026

@williammartin williammartin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely better than today but a couple of questions.

Comment thread app/src/lib/stores/copilot-store.ts Resolved
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.
williammartin
williammartin previously approved these changes Sep 30, 2026
@sergiou87
sergiou87 enabled auto-merge September 30, 2026 08:56

@niik niik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@sergiou87

Copy link
Copy Markdown
Member

Ohhhh @niik I didn't know that existed! Thanks 🙇‍♂️

From what I see, when true that adds system instructions to add the co-author thing 😂 Instructions everywhere.

I've set it to false in 5a9e623 and but still keep the instructions to, by default, not add Copilot as co-author unless some other instructions say otherwise.

Please take another look when you have a chance 🙏

@sergiou87
sergiou87 requested a review from niik September 30, 2026 11:29
@sergiou87
sergiou87 merged commit 17cf073 into development Sep 30, 2026
9 checks passed
@sergiou87
sergiou87 deleted the copilot/fix-copilot-commit-description branch September 30, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copilot commit generation intermittently appends extra description and adds Copilot as official co-author

5 participants