You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by sh...@apache.org on 2019/08/13 16:29:22 UTC
[allura] 01/02: [#8323] Add merge request support for user
notifications
This is an automated email from the ASF dual-hosted git repository.
shalithasuranga pushed a commit to branch ss/8323
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 6f071335a05db8ddc10c4aee48f5ffbf26efcf69
Author: Shalitha Suranga <sh...@gmail.com>
AuthorDate: Tue Aug 13 21:40:10 2019 +0530
[#8323] Add merge request support for user notifications
---
Allura/allura/controllers/repository.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index 0d08086..3d72882 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -220,6 +220,7 @@ class RepoRootController(BaseController, FeedController):
ref_id=mr.index_id(),
)
session(t).flush()
+ allura.tasks.notification_tasks.send_usermentions_notification(mr, kw['description'])
g.director.create_activity(c.user, 'created', mr,
related_nodes=[c.project], tags=['merge-request'])
redirect(mr.url())
@@ -475,6 +476,7 @@ class MergeRequestController(object):
# trigger error_handler directly
return self.edit(**kw)
changes = OrderedDict()
+ old_text = self.req.description
if self.req.summary != kw['summary']:
changes['Summary'] = [self.req.summary, kw['summary']]
self.req.summary = kw['summary']
@@ -493,6 +495,7 @@ class MergeRequestController(object):
if changes:
self.req.add_meta_post(changes=changes)
+ allura.tasks.notification_tasks.send_usermentions_notification(self.req, kw['description'], old_text)
g.director.create_activity(c.user, 'updated', self.req,
related_nodes=[c.project], tags=['merge-request'])
self.refresh()