summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authormrsdizzie <info@mrsdizzie.com>2019-12-22 03:29:26 -0500
committerzeripath <art27@cantab.net>2019-12-22 08:29:26 +0000
commit1df701fd1abbcee93dfcd3cdb114a0f35cb6be45 (patch)
tree70b1f1a47be30eb83ae89a6ba444bcf48357f303 /models
parent875d6b2f8e52a362e47118393bcd47026852db8c (diff)
downloadgitea-1df701fd1abbcee93dfcd3cdb114a0f35cb6be45.tar.gz
gitea-1df701fd1abbcee93dfcd3cdb114a0f35cb6be45.zip
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 <xiaolunwen@gmail.com>
Diffstat (limited to 'models')
-rw-r--r--models/action.go1
-rw-r--r--models/repo_watch.go2
2 files changed, 2 insertions, 1 deletions
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
}