diff options
Diffstat (limited to 'modules/notification/webhook/webhook.go')
-rw-r--r-- | modules/notification/webhook/webhook.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/notification/webhook/webhook.go b/modules/notification/webhook/webhook.go index c767acf134..35f0cdc596 100644 --- a/modules/notification/webhook/webhook.go +++ b/modules/notification/webhook/webhook.go @@ -6,6 +6,7 @@ package webhook import ( "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" @@ -136,7 +137,7 @@ func (m *webhookNotifier) NotifyMigrateRepository(doer *models.User, u *models.U func (m *webhookNotifier) NotifyIssueChangeAssignee(doer *models.User, issue *models.Issue, assignee *models.User, removed bool, comment *models.Comment) { if issue.IsPull { - mode, _ := models.AccessLevelUnit(doer, issue.Repo, models.UnitTypePullRequests) + mode, _ := models.AccessLevelUnit(doer, issue.Repo, unit.TypePullRequests) if err := issue.LoadPullRequest(); err != nil { log.Error("LoadPullRequest failed: %v", err) @@ -160,7 +161,7 @@ func (m *webhookNotifier) NotifyIssueChangeAssignee(doer *models.User, issue *mo return } } else { - mode, _ := models.AccessLevelUnit(doer, issue.Repo, models.UnitTypeIssues) + mode, _ := models.AccessLevelUnit(doer, issue.Repo, unit.TypeIssues) apiIssue := &api.IssuePayload{ Index: issue.Index, Issue: convert.ToAPIIssue(issue), |