summaryrefslogtreecommitdiffstats
path: root/models/wiki.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-07-26 05:50:20 +0800
committerzeripath <art27@cantab.net>2019-07-25 22:50:20 +0100
commit6782a704ef25f66902f357712218af9d4696fdda (patch)
tree7a60488035da956390e27c2912f61198e6a8c1c4 /models/wiki.go
parent18c0e9c2a95f3051bc1615a6cda0dd88b5489117 (diff)
downloadgitea-6782a704ef25f66902f357712218af9d4696fdda.tar.gz
gitea-6782a704ef25f66902f357712218af9d4696fdda.zip
Fix bug create/edit wiki pages when code master branch protected (#7580)
* fix bug create/edit wiki pages when code master branch protected * improve FullPushingEnvironment function
Diffstat (limited to 'models/wiki.go')
-rw-r--r--models/wiki.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/models/wiki.go b/models/wiki.go
index 9ae3386333..d47f58f5a3 100644
--- a/models/wiki.go
+++ b/models/wiki.go
@@ -217,7 +217,13 @@ func (repo *Repository) updateWikiPage(doer *User, oldWikiName, newWikiName, con
if err := git.Push(basePath, git.PushOptions{
Remote: "origin",
Branch: fmt.Sprintf("%s:%s%s", commitHash.String(), git.BranchPrefix, "master"),
- Env: PushingEnvironment(doer, repo),
+ Env: FullPushingEnvironment(
+ doer,
+ doer,
+ repo,
+ repo.Name+".wiki",
+ 0,
+ ),
}); err != nil {
log.Error("%v", err)
return fmt.Errorf("Push: %v", err)