From 1df701fd1abbcee93dfcd3cdb114a0f35cb6be45 Mon Sep 17 00:00:00 2001 From: mrsdizzie Date: Sun, 22 Dec 2019 03:29:26 -0500 Subject: Add ActionCommentPull action (#9456) * Add ActionCommentPull action Adds ActionCommentPull action to distinguish between a comment on an issue and on a pull request * Update modules/notification/action/action.go Co-authored-by: Lunny Xiao --- models/action.go | 1 + models/repo_watch.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'models') diff --git a/models/action.go b/models/action.go index bd7ceb4b36..dd642c6c1f 100644 --- a/models/action.go +++ b/models/action.go @@ -50,6 +50,7 @@ const ( ActionMirrorSyncDelete // 20 ActionApprovePullRequest // 21 ActionRejectPullRequest // 22 + ActionCommentPull // 23 ) // Action represents user operation type and other information to diff --git a/models/repo_watch.go b/models/repo_watch.go index 2279dcb115..7d421081a4 100644 --- a/models/repo_watch.go +++ b/models/repo_watch.go @@ -210,7 +210,7 @@ func notifyWatchers(e Engine, act *Action) error { if !act.Repo.checkUnitUser(e, act.UserID, false, UnitTypeIssues) { continue } - case ActionCreatePullRequest, ActionMergePullRequest, ActionClosePullRequest, ActionReopenPullRequest: + case ActionCreatePullRequest, ActionCommentPull, ActionMergePullRequest, ActionClosePullRequest, ActionReopenPullRequest: if !act.Repo.checkUnitUser(e, act.UserID, false, UnitTypePullRequests) { continue } -- cgit v1.2.3