chore(git): Need author and commiter for doing git merge

This commit is contained in:
Himanshu Mishra
2020-12-23 00:34:12 +01:00
parent 9ca586e579
commit cb28e1a6a0
2 changed files with 17 additions and 1 deletions
+12 -1
View File
@@ -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 }) {
+5
View File
@@ -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) {