Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont' send assign webhooks when creating issue #5365

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
dont' send assign webhooks when creating issue
  • Loading branch information
lunny committed Nov 20, 2018
commit 82fbb8bb37cb0a5e91a0e2b1acecf90476935e86
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