chore(git): Need author and commiter for doing git merge
This commit is contained in:
@@ -148,16 +148,27 @@ class SCM {
|
||||
dir,
|
||||
headBranch,
|
||||
baseBranch,
|
||||
author,
|
||||
committer,
|
||||
}: {
|
||||
dir: string;
|
||||
headBranch: string;
|
||||
baseBranch?: string;
|
||||
author: { name: string; email: string };
|
||||
committer: { name: string; email: string };
|
||||
}) {
|
||||
this.config.logger?.info(
|
||||
`Merging branch '${headBranch}' into '${baseBranch}' for repository {dir=${dir}}`,
|
||||
);
|
||||
// If baseBranch is undefined, current branch is used.
|
||||
return git.merge({ fs, dir, ours: baseBranch, theirs: headBranch });
|
||||
return git.merge({
|
||||
fs,
|
||||
dir,
|
||||
ours: baseBranch,
|
||||
theirs: headBranch,
|
||||
author,
|
||||
committer,
|
||||
});
|
||||
}
|
||||
|
||||
async push({ dir, remoteName }: { dir: string; remoteName: string }) {
|
||||
|
||||
@@ -168,6 +168,11 @@ export const checkoutGitRepository = async (
|
||||
dir: repositoryTmpPath,
|
||||
headBranch: `origin/${currentBranchName}`,
|
||||
baseBranch: currentBranchName || undefined,
|
||||
author: { name: 'Backstage TechDocs', email: 'techdocs@backstage.io' },
|
||||
committer: {
|
||||
name: 'Backstage TechDocs',
|
||||
email: 'techdocs@backstage.io',
|
||||
},
|
||||
});
|
||||
return repositoryTmpPath;
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user