Commit graph

18 commits

Author SHA1 Message Date
🙈 jacopo beschi 🙉
c6b1043e9d Resolve "Make a Rubocop that forbids returning from a block" 2018-04-18 09:19:40 +00:00
YarNayar
99b01e2359 Send notification emails when push to a merge request
Closes #23460
2018-03-26 13:24:52 +01:00
Mario de la Ossa
4cb3b71d9d
Always notify new mentions even if explicitly unsubscribed 2018-03-19 12:13:03 -06:00
Bob Van Landuyt
148816cd67 Port read_cross_project ability from EE 2018-02-22 17:11:36 +01:00
Mario de la Ossa
23a20c20f8
Initial work to add notification reason to emails
Adds `#build_notification_recipients` to `NotificationRecipientService`
that returns the `NotificationRecipient` objects in order to be able to
access the new attribute `reason`.

This new attribute is used in the different notifier methods in order to
add the reason as a header: `X-GitLab-NotificationReason`.

Only the reason with the most priority gets sent.
2018-01-16 19:17:55 -06:00
🙈 jacopo beschi 🙉
729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
http://jneen.net/
3676275a5a don't rely on order of notification levels
factor out #suitable_notification_level? and check manually by
notification level. this makes the notification logic clear and actually
reflect what is in the documentation as to what should happen with each
setting.
2017-08-21 15:34:25 -07:00
http://jneen.net/
38737345ab skip the :read_project check for new_project_member
since we're just adding them as a member, the permission may still
return false.
2017-08-11 16:02:08 -07:00
http://jneen.net/
7e7f602d29 make NotificationRecipient a little more customizable 2017-08-11 16:02:01 -07:00
http://jneen.net/
eaa503d679 move the read_ability logic into NotificationRecipient 2017-08-03 09:07:18 -07:00
http://jneen.net/
e5496e1e8e use the accessor for type 2017-08-03 09:07:18 -07:00
http://jneen.net/
4af2c64713 fix comment 2017-08-03 09:07:18 -07:00
http://jneen.net/
444c858449 use safe navigation on notification_setting 2017-08-03 09:07:18 -07:00
http://jneen.net/
c2dd4239c9 short-circuit if there is no policy, and add :read_project check 2017-08-03 09:07:18 -07:00
http://jneen.net/
18288fe21e style fixes 2017-08-03 09:07:18 -07:00
http://jneen.net/
e7d136ebda don't require project
it's not there in the case of personal snippets, f. ex., and we've
already guarded against its being missing in #find_notification_setting
2017-08-03 09:07:18 -07:00
http://jneen.net/
19309b9705 default the project to target.project 2017-08-03 09:07:18 -07:00
http://jneen.net/
618a3d125c move Recipient to its own NotificationRecipient file 2017-08-03 09:07:18 -07:00