summaryrefslogtreecommitdiff
path: root/app/services/notification_recipient_service.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix unexpected extra notification mailsPatrick Derichs2019-04-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using custom_action and recipient filtering Add more generic filtering to user_ids_notifiable_on Add changelog entry Remove commented class Method is no longer needed Overloading no longer required Filter by action just in case of custom notification level Add participant check Fix unexpected extra notification mails Using custom_action and recipient filtering Add more generic filtering to user_ids_notifiable_on Add changelog entry Remove commented class Method is no longer needed Overloading no longer required Filter by action just in case of custom notification level Fix comment Add repond_to? checks Reverted custom_action filtering Enhanced output of should_email helper Changed :watch to :participating for custom notifiable users Change spec variable name Enhanced participating check These conditions are no longer needed Fix custom notification handling for participating type Participating level should include maintainers Fixed add_guest notification Fix successful pipeline notification Refactoring: Use maintainer? method on team instead Add spec for new_issue: true for a custom group setting which should have lower prio than an available project setting Clean up specs
* [CE] Support multiple assignees for merge requestsosw-multi-assignees-merge-requestsOswaldo Ferreira2019-04-081-17/+7
| | | | | Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161 (code out of ee/ folder).
* Reduce remaining diff with EE in app/servicesRémy Coutable2019-02-141-1/+6
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Send a notification email on mirror update errorsAlejandro Rodríguez2018-12-111-0/+23
| | | | | | The email is sent to project maintainers containing the last mirror update error. This will allow maintainers to set alarms and react accordingly.
* Disable existing offenses for the CodeReuse copsYorick Peterse2018-09-111-0/+18
| | | | | This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
* Allow extensible mention type action for EEMark Chao2018-08-141-1/+7
|
* Allow NotificationRecipientService::Builder::Default to handle target ↵Mark Chao2018-08-141-1/+1
| | | | without project (e.g. Epic)
* Add email_events to replace EMAIL_EVENTS because it needs to be dynamic,Mark Chao2018-08-141-1/+1
| | | allowing override for EE.
* Enable frozen string in apps/uploaders/*.rbgfyoung2018-07-161-0/+2
| | | | Partially addresses #47424.
* Resolve Naming/UncommunicativeMethodLin Jen-Shin2018-07-091-6/+6
|
* Use stable gitlab-styles and eliminate offensesLin Jen-Shin2018-07-091-0/+1
|
* Updates from `rubocop -a`Lin Jen-Shin2018-07-091-2/+0
|
* Notify with email when merge request became unmergeablelulalala2018-05-171-0/+25
| | | | Display MR unmergeable reasons
* Backport 5480-epic-notifications from EEMario de la Ossa2018-05-071-5/+30
|
* Merge branch 'master' into 'stuartnelson3/gitlab-ce-stn/issue-due-email'Sean McGivern2018-04-101-2/+1
|\ | | | | | | # Conflicts: # db/schema.rb
| * Refactor `add_recipients`blackst0ne-rails5-fix-frozen-arrayblackst0ne2018-04-091-3/+2
| |
| * [Rails5] Fix spec/requests/projects/cycle_analytics_events_spec.rbblackst0ne2018-04-071-1/+1
| |
* | Only send issue due emails to participants and custom subscribersSean McGivern2018-03-301-1/+2
| |
* | Send issue due emails to all participantsSean McGivern2018-03-301-2/+2
| |
* | Send email to recipientsStuart Nelson2018-03-261-2/+8
|/
* Add discussion APIjprovazn-apiJan Provaznik2018-03-071-1/+1
| | | | | * adds basic discussions API for issues and snippets * reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
* Initial work to add notification reason to emailsMario de la Ossa2018-01-161-22/+26
| | | | | | | | | | | 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.
* Fix watch level for mentions in descriptionSean McGivern2017-12-041-1/+12
| | | | | | | | | | | | | | | For a user with the mention notification level set, the type of their corresponding NotificationRecipient must be :mention for them to receive an email. We set this correctly on notes, but we weren't adding it on new issues or MRs - perhaps because these users are also participants. But the type of the NotificationRecipient in that case would be :participant, not mention, so we have to add the mentioned users manually when creating an issue or MR. When editing an issue or MR, and there are newly-mentioned users to email, we still use the :new_issue and :new_merge_request actions, so this works for that case as well.
* actually use the :participating notification typehttp://jneen.net/2017-08-211-1/+1
|
* rubocop style fixhttp://jneen.net/2017-08-031-1/+1
|
* add a comment warning that note.project may be nilhttp://jneen.net/2017-08-031-0/+4
|
* remove build_relabeled_recipientshttp://jneen.net/2017-08-031-19/+0
|
* move the read_ability logic into NotificationRecipienthttp://jneen.net/2017-08-031-16/+0
|
* rm unused methodshttp://jneen.net/2017-08-031-26/+0
|
* disable the delegate cophttp://jneen.net/2017-08-031-0/+1
|
* deparameterize `project`http://jneen.net/2017-08-031-13/+17
| | | | since 99% of the time it's `target.project` anyways.
* unmemoize read_abilityhttp://jneen.net/2017-08-031-8/+9
| | | | since it's only called once now in make_recipient
* rm unused NewNote#subjecthttp://jneen.net/2017-08-031-4/+0
| | | | | its functionality is swept into the project permission check in NotificationRecipient#has_access? now
* clearer argument namehttp://jneen.net/2017-08-031-2/+2
|
* short-circuit if there is no policy, and add :read_project checkhttp://jneen.net/2017-08-031-5/+1
|
* force queries to include notification settingshttp://jneen.net/2017-08-031-2/+11
|
* use a simple pluck, since equivalent filtering happens laterhttp://jneen.net/2017-08-031-3/+1
|
* style fixeshttp://jneen.net/2017-08-031-1/+2
|
* .notifiable_users: compact the passed-in usershttp://jneen.net/2017-08-031-1/+1
|
* default the project to target.projecthttp://jneen.net/2017-08-031-1/+2
|
* use intersection and diff operators instead of eachhttp://jneen.net/2017-08-031-22/+2
|
* make sure #custom_action is always definedhttp://jneen.net/2017-08-031-0/+4
|
* move Recipient to its own NotificationRecipient filehttp://jneen.net/2017-08-031-109/+7
|
* move the #build_* methods to static, parameterize the projecthttp://jneen.net/2017-08-031-31/+26
|
* factor out .notifiable_usershttp://jneen.net/2017-08-031-36/+4
|
* don't elevate to :watch if no @custom_action is providedhttp://jneen.net/2017-08-031-1/+1
|
* rm the @builder argument and factor out .notifiable_usershttp://jneen.net/2017-08-031-13/+37
|
* move filtering logic into Recipient classhttp://jneen.net/2017-08-031-99/+102
|
* add builder helpers with levels and start to separate out #filter!http://jneen.net/2017-08-031-54/+113
|
* make recipients mutative during the buildhttp://jneen.net/2017-08-031-64/+73
|