Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extensions/git/src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ export class Repository implements Disposable {
commands.executeCommand('_aiEdits.clearAiContributions', resources);
}

private static readonly AI_CO_AUTHOR_TRAILER = 'Co-authored-by: Copilot <copilot@github.com>';
private static readonly AI_CO_AUTHOR_TRAILER = 'Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>';
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

If appendAICoAuthorTrailer (or related logic) checks for an existing AI trailer by exact string match against AI_CO_AUTHOR_TRAILER, changing this value can cause duplicate trailers when a commit message already contains the old copilot@github.com trailer (e.g., after upgrading). Consider detecting the Copilot trailer via a stable pattern (e.g., matching Co-authored-by: Copilot <...>), or supporting both the old and new emails for presence checks/cleanup.

Copilot uses AI. Check for mistakes.

private async appendAICoAuthorTrailer(
message: string | undefined,
Expand Down
4 changes: 2 additions & 2 deletions extensions/git/src/test/git.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ suite('git', () => {

test('AI co-author (Copilot)', function () {
assert.deepStrictEqual(
parseCoAuthors('Fix bug\n\nCo-authored-by: Copilot <copilot@github.com>'),
[{ name: 'Copilot', email: 'copilot@github.com' }]
parseCoAuthors('Fix bug\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>'),
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.

How is this better than copilot@github.com?

[{ name: 'Copilot', email: '223556219+Copilot@users.noreply.github.com' }]
Comment on lines +634 to +635
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

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

The new Copilot noreply email is now duplicated as a raw string in test code and in Repository.AI_CO_AUTHOR_TRAILER. To prevent future drift (e.g., if the email changes again), consider centralizing this value in a shared constant/module that both the repository logic and tests can reference, or have the test assert via the same source of truth used to build the trailer.

Suggested change
parseCoAuthors('Fix bug\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>'),
[{ name: 'Copilot', email: '223556219+Copilot@users.noreply.github.com' }]
parseCoAuthors('Fix bug\n\nCo-authored-by: Copilot <copilot@example.com>'),
[{ name: 'Copilot', email: 'copilot@example.com' }]

Copilot uses AI. Check for mistakes.
);
});

Expand Down
Loading