summaryrefslogtreecommitdiff
path: root/app/services/notification_service.rb
Commit message (Collapse)AuthorAgeFilesLines
* Notify with email when merge request became unmergeablelulalala2018-05-171-0/+17
| | | | Display MR unmergeable reasons
* Update doclulalala2018-05-171-0/+1
|
* Move NotificationService calls to SidekiqSean McGivern2018-04-251-33/+42
| | | | | | | | | | | | | | | | | | | | | The NotificationService has to do quite a lot of work to calculate the recipients for an email. Where possible, we should try to avoid doing this in an HTTP request, because the mail are sent by Sidekiq anyway, so there's no need to schedule those emails immediately. This commit creates a generic Sidekiq worker that uses Global ID to serialise and deserialise its arguments, then forwards them to the NotificationService. The NotificationService gains an `#async` method, so you can replace: notification_service.new_issue(issue, current_user) With: notification_service.async.new_issue(issue, current_user) And have everything else work as normal, except that calculating the recipients will be done by Sidekiq, which will then schedule further Sidekiq jobs to send each email.
* Only send issue due emails to participants and custom subscribersSean McGivern2018-03-301-1/+2
|
* Merge branch 'master' into stuartnelson3/gitlab-ce-stn/issue-due-emailSean McGivern2018-03-301-0/+10
|\
| * Send notification emails when push to a merge requestYarNayar/gitlab-ce-23460-send-email-when-pushing-more-commits-to-the-merge-requestYarNayar2018-03-261-0/+10
| | | | | | | | Closes #23460
* | Send issue due emails to all participantsSean McGivern2018-03-301-1/+1
| |
* | Make linter happyStuart Nelson2018-03-261-1/+1
| |
* | Send email to recipientsStuart Nelson2018-03-261-0/+13
|/
* Backports changes made in ↵ee-5063-to-ce-backportTiago Botelho2018-03-211-2/+2
| | | | https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5063 to CE
* Prevent sending an access request to a project from failing when the project ↵dm-mirror-hard-failed-invitesDouwe Maan2018-03-111-2/+2
| | | | has invited members
* Add DNS verification to Pages custom domainsNick Thomas2018-02-231-0/+32
|
* Resolve "group request membership mail with too long list of "To:""🙈 jacopo beschi 🙉2018-02-191-1/+16
|
* Initial work to add notification reason to emailsMario de la Ossa2018-01-161-12/+14
| | | | | | | | | | | 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.
* Merge branch '37691-subscription-fires-multiple-notifications' into 'master'Sean McGivern2017-10-121-1/+1
|\ | | | | | | | | | | | | fix multiple notifications from being sent for multiple labels Closes #37691 See merge request gitlab-org/gitlab-ce!14798
| * fix multiple notifications from being sent for multiple labelsmicael.bergeron2017-10-101-1/+1
| | | | | | | | | | This also refactor the email_helper support spec to watch for multiple emails being sent.
* | Send a confirmation email when the user adds a secondary email address. ↵Brett Walker2017-09-231-7/+0
|/ | | | Utilizes the Devise `confirmable` capabilities. Issue #37385
* Whitelist or fix additional `Gitlab/PublicSend` cop violationsrs-more-public-send-whitelistsRobert Speicher2017-08-141-0/+2
| | | | | An upcoming update to rubocop-gitlab-security added additional violations.
* skip the :read_project check for new_project_memberhttp://jneen.net/2017-08-111-1/+1
| | | | | since we're just adding them as a member, the permission may still return false.
* check notifiability for more emailshttp://jneen.net/2017-08-111-7/+44
|
* another rubocop style fixrefactor.notification-recipient-buildershttp://jneen.net/2017-08-031-1/+1
|
* remove build_relabeled_recipientshttp://jneen.net/2017-08-031-1/+7
|
* move the read_ability logic into NotificationRecipienthttp://jneen.net/2017-08-031-1/+0
|
* deparameterize `project`http://jneen.net/2017-08-031-28/+20
| | | | since 99% of the time it's `target.project` anyways.
* default the project to target.projecthttp://jneen.net/2017-08-031-2/+2
|
* require that the user be able to :read_buildhttp://jneen.net/2017-08-031-1/+2
| | | | to get a pipeline_failed email
* make sure users have to be able to read_pipelinehttp://jneen.net/2017-08-031-1/+2
| | | | to get pipeline failed notifications
* move the #build_* methods to static, parameterize the projecthttp://jneen.net/2017-08-031-10/+14
|
* factor out .notifiable_usershttp://jneen.net/2017-08-031-5/+4
|
* rm the @builder argument and factor out .notifiable_usershttp://jneen.net/2017-08-031-2/+1
|
* notification email on add new gpg keyAlexis Reigel2017-07-271-0/+10
|
* Deserialise existing custom notification settingsdeserialize-custom-notificationsSean McGivern2017-06-151-1/+1
| | | | | | Create a post-deployment migration to update all existing notification settings with at least one custom level enabled to the new format. Also handle the same conversion when updating settings, to catch any stragglers.
* Enable the Style/TrailingCommaInArguments copRémy Coutable2017-05-101-1/+1
| | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* [Multiple issue assignees] Resolving conflictsValery Sizov2017-05-041-1/+3
|
* Backport of multiple_assignees_feature [ci skip]Valery Sizov2017-05-041-6/+21
|
* Quiet pipeline emailsquiet-pipelinesSean McGivern2017-04-031-2/+2
| | | | | | | | | | 1. Never send a pipeline email to anyone other than the user who created the pipeline. 2. Only send pipeline success emails to people with the custom notification setting for enabled. Watchers and participants will never receive this. 3. When custom settings are unset (for new settings and legacy ones), act as if failed_pipeline is set.
* Merge branch 'master' into sh-bring-back-option-to-be-notified-of-own-activityStan Hu2017-03-171-304/+19
|\
| * Resolve "Extract logic of who should receive notification into separate classes"Dongqing Hu2017-03-171-304/+19
| |
* | Revert "Merge branch '8836-mr-revert' into 'master'Stan Hu2017-03-161-5/+6
|/ | | | | This reverts commit 68e40bd49fde7b790bb31b9ac85a249bedd817d2, reversing changes made to 2d1f823b4c8b60cee525384cb52e547d2be8925a.
* Revert "Merge branch 'option-to-be-notified-of-own-activity' into 'master'Stan Hu2017-03-151-6/+5
| | | | | This reverts commit 5e9666880376b3f53edb95cba77b5642d3cc1810, reversing changes made to b35378a938e22f745b6c6ea32b53cb50f9b6c627.
* use policies to protect sending emailhttp://jneen.net/2017-03-091-1/+1
|
* Update occurrences of MWBS to MWPSfix/mwbs-to-mwpsJames Lopez2017-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename column in the database Rename fields related to import/export feature Rename API endpoints Rename documentation links Rename the rest of occurrences in the code Replace the images that contain the words "build succeeds" and docs referencing to them Make sure pipeline is green and nothing is missing. updated doc images renamed only_allow_merge_if_build_succeeds in projects and fixed references more updates fix some spec failures fix rubocop offences fix v3 api spec fix MR specs fixed issues with partials fix MR spec fix alignment add missing v3 to v4 doc wip - refactor v3 endpoints fix specs fix a few typos fix project specs copy entities fully to V3 fix entity error more fixes fix failing specs fixed missing entities in V3 API remove comment updated code based on feedback typo fix spec
* Remove `try` from NotificationService#build_recipientsRichard Macklin2017-02-031-1/+1
| | | | | After refactoring pipeline_finished to avoid passing `nil` for current_user, we shouldn't need to use `try` here anymore.
* Refactor NotificationService#pipeline_finished to use skip_current_userRichard Macklin2017-02-031-2/+3
| | | | instead of passing nil for current_user
* Update NotificationService to respect User#notified_of_own_activityRichard Macklin2017-02-011-3/+3
|
* Fix notification when global=disabled, group=watch395-fix-notification-when-group-set-to-watchamaia2017-01-301-4/+4
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* address commentsJarka Kadlecova2017-01-251-14/+9
|
* Support notes without projectJarka Kadlecova2017-01-181-7/+20
|
* Introduce EXCLUDED_WATCHER_EVENTS to exclude eventsremove-successful-pipeline-emails-for-nowLin Jen-Shin2017-01-051-2/+1
| | | | | for watchers. Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8176#note_20920905
* Make successful pipeline emails off for watchersLin Jen-Shin2017-01-051-1/+5
| | | | Closes #24845