@@ -185,12 +185,12 @@ func (t *TemporaryUploadRepository) GetLastCommitByRef(ref string) (string, erro
185185}
186186
187187// 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 ())
190190}
191191
192192// 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 ) {
194194 authorSig := author .NewGitSig ()
195195 committerSig := committer .NewGitSig ()
196196
@@ -236,6 +236,13 @@ func (t *TemporaryUploadRepository) CommitTreeWithDate(author, committer *models
236236 }
237237 }
238238
239+ if signoff {
240+ // Signed-off-by
241+ _ , _ = messageBytes .WriteString ("\n " )
242+ _ , _ = messageBytes .WriteString ("Signed-off-by: " )
243+ _ , _ = messageBytes .WriteString (committerSig .String ())
244+ }
245+
239246 env = append (env ,
240247 "GIT_COMMITTER_NAME=" + committerSig .Name ,
241248 "GIT_COMMITTER_EMAIL=" + committerSig .Email ,
0 commit comments