diff options
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/pull.go | 2 | ||||
-rw-r--r-- | routers/repo/webhook.go | 2 |
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 { |