summaryrefslogtreecommitdiffstats
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-16 10:19:09 -0700
committerUnknwon <u@gogs.io>2016-08-16 10:19:09 -0700
commit6f9a95f83020e215ebe3942bd541da34791dd043 (patch)
tree9d95bc94e2346c808863377f79708d32decb8908 /routers/repo/issue.go
parent8bf57be9ba82d7b5289c894c902b5ecaaa1142bf (diff)
downloadgitea-6f9a95f83020e215ebe3942bd541da34791dd043.tar.gz
gitea-6f9a95f83020e215ebe3942bd541da34791dd043.zip
#2246 add HTMLURL to webhook type
- Fill Milestone and Assignee field when available in webhook payload
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 3b36556c00..37731e5ee6 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -538,8 +538,8 @@ func ViewIssue(ctx *context.Context) {
// Get more information if it's a pull request.
if issue.IsPull {
- if issue.HasMerged {
- ctx.Data["DisableStatusChange"] = issue.HasMerged
+ if issue.PullRequest.HasMerged {
+ ctx.Data["DisableStatusChange"] = issue.PullRequest.HasMerged
PrepareMergedViewPullInfo(ctx, issue)
} else {
PrepareViewPullInfo(ctx, issue)
@@ -822,7 +822,7 @@ func NewComment(ctx *context.Context, form auth.CreateCommentForm) {
// Check if issue admin/poster changes the status of issue.
if (ctx.Repo.IsWriter() || (ctx.IsSigned && issue.IsPoster(ctx.User.ID))) &&
(form.Status == "reopen" || form.Status == "close") &&
- !(issue.IsPull && issue.HasMerged) {
+ !(issue.IsPull && issue.PullRequest.HasMerged) {
// Duplication and conflict check should apply to reopen pull request.
var pr *models.PullRequest
@@ -839,12 +839,12 @@ func NewComment(ctx *context.Context, form auth.CreateCommentForm) {
// Regenerate patch and test conflict.
if pr == nil {
- if err = issue.UpdatePatch(); err != nil {
+ if err = issue.PullRequest.UpdatePatch(); err != nil {
ctx.Handle(500, "UpdatePatch", err)
return
}
- issue.AddToTaskQueue()
+ issue.PullRequest.AddToTaskQueue()
}
}