mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Don't pass author into git functions - use values from config
This commit is contained in:
3 files changed
+37
-93
No files matched your search
+1
-50
@@ -306,7 +306,7 @@ describe('Git', () => {
|
||||
const { readGitSettings } = await import('./configUtils');
|
||||
vi.mocked(readGitSettings).mockResolvedValue({
|
||||
credentials: [],
|
||||
coAuthorEnabled: true,
|
||||
coAuthorEnabled: false,
|
||||
});
|
||||
|
||||
await gitInstance.commit({
|
||||
@@ -322,10 +322,6 @@ describe('Git', () => {
|
||||
name: 'shakespeare.diy',
|
||||
email: '[email protected]',
|
||||
},
|
||||
committer: {
|
||||
name: 'shakespeare.diy',
|
||||
email: '[email protected]',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -351,10 +347,6 @@ describe('Git', () => {
|
||||
name: 'John Doe',
|
||||
email: '[email protected]',
|
||||
},
|
||||
committer: {
|
||||
name: 'John Doe',
|
||||
email: '[email protected]',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -380,47 +372,6 @@ describe('Git', () => {
|
||||
name: 'John Doe',
|
||||
email: '[email protected]',
|
||||
},
|
||||
committer: {
|
||||
name: 'John Doe',
|
||||
email: '[email protected]',
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('respects provided author when explicitly passed', async () => {
|
||||
const { readGitSettings } = await import('./configUtils');
|
||||
vi.mocked(readGitSettings).mockResolvedValue({
|
||||
credentials: [],
|
||||
name: 'John Doe',
|
||||
email: '[email protected]',
|
||||
coAuthorEnabled: true,
|
||||
});
|
||||
|
||||
await gitInstance.commit({
|
||||
dir: '/test',
|
||||
message: 'Test commit',
|
||||
author: {
|
||||
name: 'Custom Author',
|
||||
email: '[email protected]',
|
||||
},
|
||||
committer: {
|
||||
name: 'Custom Committer',
|
||||
email: '[email protected]',
|
||||
},
|
||||
});
|
||||
|
||||
expect(mockGit.commit).toHaveBeenCalledWith({
|
||||
fs,
|
||||
dir: '/test',
|
||||
message: 'Test commit',
|
||||
author: {
|
||||
name: 'Custom Author',
|
||||
email: '[email protected]',
|
||||
},
|
||||
committer: {
|
||||
name: 'Custom Committer',
|
||||
email: '[email protected]',
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user