summaryrefslogtreecommitdiff
path: root/app/services/merge_requests/reopen_service.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable more frozen string in app/services/**/*.rbrepo-forks/gitlab-ce-frozen-string-enable-apps-services-inner-moregfyoung2018-07-171-0/+2
| | | | Partially addresses #47424.
* Move NotificationService calls to SidekiqSean McGivern2018-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* Cache merged and closed events data in merge_request_metrics tableOswaldo Ferreira2018-01-021-1/+12
|
* Refresh open Issue and Merge Request project counter caches when re-openingRob Ede2017-10-301-0/+1
|
* Merge issuable "reopened" state into "opened"merge-issuable-reopened-into-opened-stateYorick Peterse2017-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having two states that essentially mean the same thing is very much like having a boolean "true" and boolean "mostly-true": it's rather silly. This commit merges the "reopened" state into the "opened" state while taking care of system notes still showing messages along the lines of "Alice reopened this issue". A big benefit from having only two states (opened and closed) is that indexing and querying becomes simpler and more performant. For example, to get all the opened queries we no longer have to query both states: SELECT * FROM issues WHERE project_id = 2 AND state IN ('opened', 'reopened'); Instead we can query a single state directly, which can be much faster: SELECT * FROM issues WHERE project_id = 2 AND state = 'opened'; Further, only having two states makes indexing easier as we will only ever filter (and thus scan an index) using a single value. Partial indexes could help but aren't supported on MySQL, complicating the development process and not being helpful for MySQL.
* Clear issuable counter caches on updateclear-issuable-count-cache-for-statesSean McGivern2017-07-191-1/+1
| | | | | | When an issuable's state changes, or one is created, we should clear the cache counts for a user's assigned issuables, and also the project-wide caches for this user type.
* Fix counters cache invalidation for Issues and Merge RequestsValery Sizov2017-05-261-0/+1
|
* Add system note with link to diff comparison when MR discussion becomes outdatedDouwe Maan2017-05-231-1/+1
|
* Enforce permissions in `{Issues,MergeRequests}::{Close,Reopen}Service`Rémy Coutable2016-08-131-0/+2
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Automatically update diff note positions when MR is pushed toDouwe Maan2016-07-061-1/+1
|
* Organize event order execution when update issue or mrDmitriy Zaporozhets2015-01-251-1/+1
|
* Add action property to merge request hookjubianchi2015-01-201-1/+1
|
* Reopen mr email notification.Marin Jankovski2014-07-031-0/+1
|
* MergeRequest services for create, update, close and reopenDmitriy Zaporozhets2014-04-021-0/+15
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>