summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-11-07 16:37:32 +0100
committerSandro Santilli <strk@kbt.io>2016-11-07 17:05:08 +0100
commit80eea77953ab5f1f12e1a01f1930b72c360a5c76 (patch)
treeef36958df6ecdf84f37a9f5c9680f591ba5cc25c /routers/repo
parent5d430c9e68f7e50e6d1727c43518e84579fd6a4f (diff)
downloadgitea-80eea77953ab5f1f12e1a01f1930b72c360a5c76.tar.gz
gitea-80eea77953ab5f1f12e1a01f1930b72c360a5c76.zip
Use MixedCase constant names
See https://github.com/golang/go/wiki/CodeReviewComments#mixed-caps
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/pull.go2
-rw-r--r--routers/repo/webhook.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index 0fdffad2db..1a5b1dd9e8 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -687,7 +687,7 @@ func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm)
HeadRepo: headRepo,
BaseRepo: repo,
MergeBase: prInfo.MergeBase,
- Type: models.PULL_REQUEST_GITEA,
+ Type: models.PullRequestGitea,
}
// FIXME: check error in the case two people send pull request at almost same time, give nice error prompt
// instead of 500.
diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go
index 3cb6d1d27e..c9d15bef08 100644
--- a/routers/repo/webhook.go
+++ b/routers/repo/webhook.go
@@ -383,7 +383,7 @@ func TestWebhook(ctx *context.Context) {
Pusher: apiUser,
Sender: apiUser,
}
- if err := models.PrepareWebhooks(ctx.Repo.Repository, models.HOOK_EVENT_PUSH, p); err != nil {
+ if err := models.PrepareWebhooks(ctx.Repo.Repository, models.HookEventPush, p); err != nil {
ctx.Flash.Error("PrepareWebhooks: " + err.Error())
ctx.Status(500)
} else {