Skip to content

Commit 5bd533c

Browse files
committed
format & fix
1 parent c8cafc0 commit 5bd533c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/notification/webhook/webhook.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,13 @@ func (m *webhookNotifier) NotifyIssueChangeContent(doer *user_model.User, issue
337337
ctx, _, finished := process.GetManager().AddContext(graceful.GetManager().HammerContext(), fmt.Sprintf("webhook.NotifyIssueChangeContent User: %s[%d] Issue[%d] #%d in [%d]", doer.Name, doer.ID, issue.ID, issue.Index, issue.RepoID))
338338
defer finished()
339339

340-
var err error
341-
if err = issue.LoadRepo(ctx); err != nil {
340+
if err := issue.LoadRepo(ctx); err != nil {
342341
log.Error("NotifyIssueChangeContent: coulnd't load repo", err)
342+
return
343343
}
344+
344345
mode, _ := models.AccessLevel(issue.Poster, issue.Repo)
346+
var err error
345347
if issue.IsPull {
346348
issue.PullRequest.Issue = issue
347349
err = webhook_services.PrepareWebhooks(issue.Repo, webhook.HookEventPullRequest, &api.PullRequestPayload{

0 commit comments

Comments
 (0)