diff options
author | Unknwon <u@gogs.io> | 2016-08-27 13:37:55 -0700 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-08-27 13:37:55 -0700 |
commit | c30b856d147dd895507c8f2334a11ed4baab6c18 (patch) | |
tree | b0212b58f1026ba581f3f9c0ef1a366a5c4706df /models/wiki.go | |
parent | 13c106af7764a0b4757348ab4c82dbf9154ee11c (diff) | |
download | gitea-c30b856d147dd895507c8f2334a11ed4baab6c18.tar.gz gitea-c30b856d147dd895507c8f2334a11ed4baab6c18.zip |
#3505 use user’s info for committer and author
Diffstat (limited to 'models/wiki.go')
-rw-r--r-- | models/wiki.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/models/wiki.go b/models/wiki.go index 2f57eadda6..f62cd2ac79 100644 --- a/models/wiki.go +++ b/models/wiki.go @@ -129,7 +129,10 @@ func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, mes } if err = git.AddChanges(localPath, true); err != nil { return fmt.Errorf("AddChanges: %v", err) - } else if err = git.CommitChanges(localPath, message, doer.NewGitSig()); err != nil { + } else if err = git.CommitChanges(localPath, git.CommitChangesOptions{ + Committer: doer.NewGitSig(), + Message: message, + }); err != nil { return fmt.Errorf("CommitChanges: %v", err) } else if err = git.Push(localPath, "origin", "master"); err != nil { return fmt.Errorf("Push: %v", err) @@ -165,7 +168,10 @@ func (repo *Repository) DeleteWikiPage(doer *User, title string) (err error) { if err = git.AddChanges(localPath, true); err != nil { return fmt.Errorf("AddChanges: %v", err) - } else if err = git.CommitChanges(localPath, message, doer.NewGitSig()); err != nil { + } else if err = git.CommitChanges(localPath, git.CommitChangesOptions{ + Committer: doer.NewGitSig(), + Message: message, + }); err != nil { return fmt.Errorf("CommitChanges: %v", err) } else if err = git.Push(localPath, "origin", "master"); err != nil { return fmt.Errorf("Push: %v", err) |