Skip to content

Commit 9722f13

Browse files
authored
Revert "Revert "conductor: make conductor bot as author""
1 parent f62802b commit 9722f13

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

experiments/conductor/cmd/runner/utilities.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,12 @@ func gitAdd(ctx context.Context, workDir string, files ...string) error {
214214
}
215215

216216
func gitCommit(ctx context.Context, workDir string, msg string) error {
217-
log.Printf("COMMAND: git commit -m %q", msg)
218-
gitcommit := exec.CommandContext(ctx, "git", "commit", "-m", msg)
217+
authorName := "kcc-conductor-bot"
218+
authorEmail := "[email protected]"
219+
authorFlag := fmt.Sprintf("%s <%s>", authorName, authorEmail)
220+
221+
log.Printf("COMMAND: git commit -m %q --author=%q", msg, authorFlag)
222+
gitcommit := exec.CommandContext(ctx, "git", "commit", "-m", msg, "--author", authorFlag)
219223
gitcommit.Dir = workDir
220224

221225
results, err := execCommand(gitcommit)

0 commit comments

Comments
 (0)