summaryrefslogtreecommitdiff
path: root/app/services
Commit message (Collapse)AuthorAgeFilesLines
* Rails 5: fix issue move serviceJasper Maes2018-09-111-1/+1
| | | | | In rails 5, the attributes method for an enum returns the name instead of the database integer.
* Synchronize the default branch when updating a remote mirrorDouglas Barbosa Alexandre2018-09-101-2/+3
|
* Merge branch 'lock-unlock-quick-actions' into 'master'Rémy Coutable2018-09-101-0/+24
|\ | | | | | | | | | | | | Add /lock and /unlock quick actions Closes #39173 See merge request gitlab-org/gitlab-ce!15197
| * Add /lock and /unlock quick actionsMehdi Lahmam2018-09-061-0/+24
| | | | | | | | Closes #39173
* | Merge branch '38208-due-dates-system-notes' into 'master'Stan Hu2018-09-092-0/+25
|\ \ | | | | | | | | | | | | | | | | | | Add system note when due date is changed Closes #38208 See merge request gitlab-org/gitlab-ce!21628
| * | Add system note when due date is changedEva Kadlecová2018-09-092-0/+25
| | |
* | | Fix scoping errors occuring for ContainerRepository on some buildsStan Hu2018-09-071-1/+1
| | |
* | | Merge branch 'sh-delete-container-registry-async' into 'master'Robert Speicher2018-09-071-0/+13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Delete a container registry asynchronously Closes #51063 and #49926 See merge request gitlab-org/gitlab-ce!21553
| * | | Delete a container registry asynchronouslyStan Hu2018-09-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a container registry has many tags, it's easy for the DELETE call to take more than 60 seconds and fail. This can also leave the registry in a bad state with null bytes since some of the images have been deleted with tags still pointing to them. In addition, we have to prevent users from accidentally initiating the delete multiple times or this could leave the registry with orphaned tags. This commit also adds a flash message to notify the user the registry is scheduled for deletion. Closes #49926, #51063
* | | | Merge branch 'osw-write-cache-upon-mr-creation-and-cache-refactoring' into ↵Douwe Maan2018-09-071-2/+2
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Write diff highlighting cache upon MR creation (refactors caching) Closes #50204 See merge request gitlab-org/gitlab-ce!21489
| * | | Cache diff highlighting upon Merge Request creation (refactors diff caching)Oswaldo Ferreira2018-09-071-2/+2
| | | |
* | | | Ask user explicitly about usage stats agreementJan Provaznik2018-09-072-0/+9
| | | |
* | | | Replace whitespaces in wiki page attachments file namesFrancisco Javier López2018-09-071-2/+10
| | | |
* | | | Use ResourceLabelEvent for tracking label changesJan Provaznik2018-09-076-44/+79
| |_|/ |/| |
* | | Automatically disable Auto DevOps for project upon first pipeline failureMayra Cabrera2018-09-062-0/+45
| | |
* | | Resolve "Migrate issue labels and milestone to related merge request"Tiago Botelho2018-09-063-16/+22
| | |
* | | render using RedCarpet if legacy_render parameter is setBrett Walker2018-09-051-1/+5
|/ /
* | Merge branch '39665-restrict-issue-reopen' into 'master'Sean McGivern2018-09-041-1/+1
|\ \ | | | | | | | | | | | | | | | | | | Restrict reopening locked issues for non authorized issue authors Closes #39665 See merge request gitlab-org/gitlab-ce!21299
| * | Restrict reopening locked issues for issue authorsJarka Kadlecová2018-09-041-1/+1
| | |
* | | Uploads to wiki stored inside the wiki git repositoryFrancisco Javier López2018-09-042-2/+73
| | |
* | | Allow whitelisting for "external collaborator by default" settingRoger Rüttimann2018-08-301-0/+12
| | |
* | | fix path bug and update specsJames Lopez2018-08-301-1/+1
| | |
* | | Fix transfer project redirect loopJames Lopez2018-08-291-2/+3
| | |
* | | Merge branch ↵Nick Thomas2018-08-281-1/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '50441-high-number-of-statement-timeouts-in-groupdestroyworker-due-to-sitestatistics' into 'master' Resolve "High number of statement timeouts in GroupDestroyWorker due to SiteStatistics" Closes #50441 See merge request gitlab-org/gitlab-ce!21366
| * | | don't trigger project deletion hooks twice when removing a groupGabriel Mazetto2018-08-261-1/+4
| | | |
* | | | Merge branch 'issue_36138' into 'master'Sean McGivern2018-08-281-8/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to delete group milestones Closes #36138 See merge request gitlab-org/gitlab-ce!21057
| * | | | Allow to delete group milestonesissue_36138Felipe Artur2018-08-061-8/+12
| | | | |
* | | | | REFACTOR: Clarify assignment fallback chainFranz Liedke2018-08-251-6/+4
| | | | |
* | | | | REFACTOR: Use early return to flatten codeFranz Liedke2018-08-251-6/+5
| | | | |
* | | | | Fix fallback logic for automatic MR title assignmentFranz Liedke2018-08-251-1/+1
| | | | |
* | | | | Allows author to vote on their own issueChantal Rollison2018-08-241-1/+1
| | | | |
* | | | | Merge branch 'sh-fix-issue-50562' into 'master'Rémy Coutable2018-08-241-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix remote mirrors failing if Git remotes have not been added Closes #50562 See merge request gitlab-org/gitlab-ce!21351
| * | | | | Fix remote mirrors failing if Git remotes have not been addedStan Hu2018-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remote mirrors only get created when the URL changes, However, during the GCP migration, the remote mirror did not get created automatically. Plus, there's no guarantee someone restoring a repository from backup would have this remote. We now add the remote each time we attempt to fetch from the repository. This works because Gitaly doesn't throw up an exception or error if the remote already exists: https://gitlab.com/gitlab-org/gitaly/issues/1317 In the future, we should attempt to add if the remote doesn't exist: https://gitlab.com/gitlab-org/gitaly/issues/1316 Closes #50562
* | | | | | Merge branch ↵Nick Thomas2018-08-232-14/+66
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '43096-controller-projects-issuescontroller-referenced_merge_requests-json-executes-more-than-100-sql-queries' into 'master' Resolve "Controller Projects::IssuesController#referenced_merge_requests.json executes more than 100 SQL queries" Closes #43096 See merge request gitlab-org/gitlab-ce!21237
| * | | | | Only load issue notes once when getting related MRs43096-controller-projects-issuescontroller-referenced_merge_requests-json-executes-more-than-100-sql-queriesSean McGivern2018-08-211-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we always call both methods from the controller - and elsewhere we call the more general method - and one uses all notes and the other uses system notes, then we should just load the notes and their authors once, and filter on the Ruby side.
| * | | | | Fix CI pipelines N+1 in Issues::ReferencedMergeRequestsServiceSean McGivern2018-08-211-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether the preloading belongs in the service or the controller is arguable, here. As the service is only used for one controller action, it seems reasonable to put it in the service, but that is not a definitive answer. Adding the preloads for MR project routes here doesn't seem to work, perhaps because of https://github.com/rails/rails/issues/32140.
| * | | | | Fix authors N+1 in Issues::ReferencedMergeRequestsServiceSean McGivern2018-08-211-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `#referenced_merge_requests` preloaded too many associations. Award emoji, for instance, are completely unnecessary here. `#closed_by_merge_requests` had the opposite problem: `#all_references` needs each item's author, and these weren't preloaded.
| * | | | | Move Issue#{referenced,closed_by}_merge_requests to serviceSean McGivern2018-08-212-14/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods don't really need to be on the Issue model. Issue#related_branches can also be moved to a service, but we can do that in a separate commit. This commit does not change any behaviour; it just moves code around, renames the service, and refactors the specs.
* | | | | | Fix wrong commit count in push event payloadStan Hu2018-08-221-4/+10
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20916. We now only use the full commit count for the initial push to the default branch. Otherwise, we rely on the number of commits that we calculated occurred in the push. The original behavior in 11.1.4: 1. When a new branch is pushed, `@push_commits_count` was set to the total number of refs available for the branch. 2. For other branches, `@push_commits_count` would remain `nil`. 3. `GitPushService#build_push_data` would build the push data with `@push_commits_count`. 4. If this were `nil`, it would be set to the right value here: https://gitlab.com/gitlab-org/gitlab-ce/blob/v11.1.4/lib/gitlab/data_builder/push.rb#L60 Broken behavior: 1. `GitPushService#push_commits_count` is always called. 2. The total number of commits is therefore always equal to the total number of refs available. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/49971
* | | | | Eliminate unnecessary and duplicate system hook firesStan Hu2018-08-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously `SystemHookPushWorker` would always be called after a push event, and this would queue a Sidekiq job regardless of whether any system hooks needed that event. Moreover, another call inside `Project#execute_hooks` would also fire system hooks if they existed. This change both removes the duplicate system hook calls. For installations without system hooks for push events, this change also can save significant amount of RAM used by Redis. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50549
* | | | | Clean up LFS objects when creating fork relationToon Claes2018-08-201-0/+8
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A forked project stores its LFS objects in the `forked_from_project`. So the LFS objects become inaccessible, and therefore delete them from the database so they'll get cleaned up. To be refactored when implementing https://gitlab.com/gitlab-org/gitlab-ce/issues/39769
* | | | Merge branch 'blacklist-destroy-all' into 'master'Robert Speicher2018-08-178-9/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Blacklist the use of destroy_all See merge request gitlab-org/gitlab-ce!21250
| * | | | Whitelist existing destroy_all offensesblacklist-destroy-allYorick Peterse2018-08-168-9/+9
| |/ / / | | | | | | | | | | | | This whitelists all existing places where we use "destroy_all".
* | | | Fix: Project deletion may not log audit events during user deletionValery Sizov2018-08-172-6/+4
| | | |
* | | | Merge branch ↵Nick Thomas2018-08-161-3/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '49796-project-deletion-may-not-log-audit-events-during-group-deletion' into 'master' Resolve "Project deletion may not log audit events during group deletion" Closes #49796 See merge request gitlab-org/gitlab-ce!21162
| * | | | Fix: Project deletion may not log audit events during group deletion49796-project-deletion-may-not-log-audit-events-during-group-deletionValery Sizov2018-08-161-3/+4
| | | | |
* | | | | Resolve "Enable Auto DevOps instance-wide on GitLab.com"Dylan Griffith2018-08-161-1/+1
| |/ / / |/| | |
* | | | 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.