@@ -185,12 +185,12 @@ func (t *TemporaryUploadRepository) GetLastCommitByRef(ref string) (string, erro
185
185
}
186
186
187
187
// CommitTree creates a commit from a given tree for the user with provided message
188
- func (t * TemporaryUploadRepository ) CommitTree (author , committer * models.User , treeHash string , message string ) (string , error ) {
189
- return t .CommitTreeWithDate (author , committer , treeHash , message , time .Now (), time .Now ())
188
+ func (t * TemporaryUploadRepository ) CommitTree (author , committer * models.User , treeHash string , message string , signoff bool ) (string , error ) {
189
+ return t .CommitTreeWithDate (author , committer , treeHash , message , signoff , time .Now (), time .Now ())
190
190
}
191
191
192
192
// CommitTreeWithDate creates a commit from a given tree for the user with provided message
193
- func (t * TemporaryUploadRepository ) CommitTreeWithDate (author , committer * models.User , treeHash string , message string , authorDate , committerDate time.Time ) (string , error ) {
193
+ func (t * TemporaryUploadRepository ) CommitTreeWithDate (author , committer * models.User , treeHash string , message string , signoff bool , authorDate , committerDate time.Time ) (string , error ) {
194
194
authorSig := author .NewGitSig ()
195
195
committerSig := committer .NewGitSig ()
196
196
@@ -236,6 +236,13 @@ func (t *TemporaryUploadRepository) CommitTreeWithDate(author, committer *models
236
236
}
237
237
}
238
238
239
+ if signoff {
240
+ // Signed-off-by
241
+ _ , _ = messageBytes .WriteString ("\n " )
242
+ _ , _ = messageBytes .WriteString ("Signed-off-by: " )
243
+ _ , _ = messageBytes .WriteString (committerSig .String ())
244
+ }
245
+
239
246
env = append (env ,
240
247
"GIT_COMMITTER_NAME=" + committerSig .Name ,
241
248
"GIT_COMMITTER_EMAIL=" + committerSig .Email ,
0 commit comments