Skip to content

Commit

Permalink
dont' send assign webhooks when creating issue (go-gitea#5365)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Nov 21, 2018
1 parent ffc0c7f commit 4f40722
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions models/issue_assignees.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,13 @@ func (issue *Issue) changeAssignee(sess *xorm.Session, doer *User, assigneeID in
return fmt.Errorf("createAssigneeComment: %v", err)
}

// if issue/pull is in the middle of creation - don't call webhook
if isCreate {
return nil
}

mode, _ := accessLevel(sess, doer.ID, issue.Repo)
if issue.IsPull {
// if pull request is in the middle of creation - don't call webhook
if isCreate {
return nil
}
if err = issue.loadPullRequest(sess); err != nil {
return fmt.Errorf("loadPullRequest: %v", err)
}
Expand Down

0 comments on commit 4f40722

Please sign in to comment.