mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 02:24:03 +00:00
work on #1748
This commit is contained in:
parent
6b8bef3cf6
commit
fad31ca302
4
gogs.go
4
gogs.go
|
@ -4,7 +4,7 @@
|
||||||
// Use of this source code is governed by a MIT-style
|
// Use of this source code is governed by a MIT-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// Gogs(Go Git Service) is a painless self-hosted Git Service written in Go.
|
// Gogs (Go Git Service) is a painless self-hosted Git Service.
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.6.18.1031 Beta"
|
const APP_VER = "0.6.19.1031 Beta"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -337,6 +337,14 @@ func CommitRepoAction(
|
||||||
return fmt.Errorf("GetOwner: %v", err)
|
return fmt.Errorf("GetOwner: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Change repository bare status and update last updated time.
|
||||||
|
if repo.IsBare {
|
||||||
|
repo.IsBare = false
|
||||||
|
if err = UpdateRepository(repo, false); err != nil {
|
||||||
|
return fmt.Errorf("UpdateRepository: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
isNewBranch := false
|
isNewBranch := false
|
||||||
opType := COMMIT_REPO
|
opType := COMMIT_REPO
|
||||||
// Check it's tag push or branch.
|
// Check it's tag push or branch.
|
||||||
|
@ -351,12 +359,6 @@ func CommitRepoAction(
|
||||||
isNewBranch = true
|
isNewBranch = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change repository bare status and update last updated time.
|
|
||||||
repo.IsBare = false
|
|
||||||
if err = UpdateRepository(repo, false); err != nil {
|
|
||||||
return fmt.Errorf("UpdateRepository: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err = updateIssuesCommit(u, repo, repoUserName, repoName, commit.Commits); err != nil {
|
if err = updateIssuesCommit(u, repo, repoUserName, repoName, commit.Commits); err != nil {
|
||||||
log.Error(4, "updateIssuesCommit: %v", err)
|
log.Error(4, "updateIssuesCommit: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -781,8 +781,8 @@ func NewComment(ctx *middleware.Context, form auth.CreateCommentForm) {
|
||||||
|
|
||||||
var comment *models.Comment
|
var comment *models.Comment
|
||||||
defer func() {
|
defer func() {
|
||||||
// Check if issue owner/poster changes the status of issue.
|
// Check if issue admin/poster changes the status of issue.
|
||||||
if (ctx.Repo.IsOwner() || (ctx.IsSigned && issue.IsPoster(ctx.User.Id))) &&
|
if (ctx.Repo.IsAdmin() || (ctx.IsSigned && issue.IsPoster(ctx.User.Id))) &&
|
||||||
(form.Status == "reopen" || form.Status == "close") &&
|
(form.Status == "reopen" || form.Status == "close") &&
|
||||||
!(issue.IsPull && issue.HasMerged) {
|
!(issue.IsPull && issue.HasMerged) {
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.6.18.1031 Beta
|
0.6.19.1031 Beta
|
Loading…
Reference in a new issue