1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

#2246 fully support of webhooks for pull request

This commit is contained in:
Unknwon
2016-08-14 03:32:24 -07:00
parent 0f33b04c87
commit 3f7f4852ef
30 changed files with 795 additions and 270 deletions

View File

@@ -52,7 +52,7 @@ func GetIssue(ctx *context.APIContext) {
func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) {
issue := &models.Issue{
RepoID: ctx.Repo.Repository.ID,
Name: form.Title,
Title: form.Title,
PosterID: ctx.User.ID,
Poster: ctx.User,
Content: form.Body,
@@ -115,7 +115,7 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
}
if len(form.Title) > 0 {
issue.Name = form.Title
issue.Title = form.Title
}
if form.Body != nil {
issue.Content = *form.Body

View File

@@ -52,7 +52,7 @@ func AddIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) {
return
}
if err = issue.AddLabels(labels); err != nil {
if err = issue.AddLabels(ctx.User, labels); err != nil {
ctx.Error(500, "AddLabels", err)
return
}
@@ -160,7 +160,7 @@ func ClearIssueLabels(ctx *context.APIContext) {
return
}
if err := issue.ClearLabels(); err != nil {
if err := issue.ClearLabels(ctx.User); err != nil {
ctx.Error(500, "ClearLabels", err)
return
}