summaryrefslogtreecommitdiff
path: root/app/services
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'sh-add-sidekiq-logging-for-bad-ci' into 'master'Grzegorz Bizon2019-09-061-1/+27
|\ | | | | | | | | Log errors for failed pipeline creation in PostReceive See merge request gitlab-org/gitlab-ce!32633
| * Log errors for failed pipeline creation in PostReceivesh-add-sidekiq-logging-for-bad-ciStan Hu2019-09-051-1/+27
| | | | | | | | | | | | | | | | | | | | When a pipeline fails to create in `PostReceive`, the error is silently discarded, making it difficult to understand why a pipeline was not created. We now add a Sidekiq warning message for this. Adding a Sentry exception when this happens would generate a lot of noise for invalid CI files. Relates to https://gitlab.com/gitlab-org/gitlab-ee/issues/14720
* | Merge branch 'ce-detect-github-pull-requests' into 'master'Kamil Trzciński2019-09-062-1/+33
|\ \ | |/ |/| | | | | Port CreateGithubPullRequestEvents migration from EE See merge request gitlab-org/gitlab-ce!31802
| * CE port for pipelines for external pull requestsce-detect-github-pull-requestsFabio Pitino2019-09-052-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect if pipeline runs for a GitHub pull request When using a mirror for CI/CD only we register a pull_request webhook. When a pull_request webhook is received, if the source branch SHA matches the actual head of the branch in the repository we create immediately a new pipeline for the external pull request. Otherwise we store the pull request info for when the push webhook is received. When using "only/except: external_pull_requests" we can detect if the pipeline has a open pull request on GitHub and create or not the job based on that.
* | Merge branch 'add-label-push-opts' into 'master'Ash McKenzie2019-09-065-14/+37
|\ \ | | | | | | | | | | | | | | | | | | Support adding and removing labels w/ push opts Closes #5942 See merge request gitlab-org/gitlab-ce!31831
| * | Simplify filter_labels method in IssuableBaseServiceadd-label-push-optsChristian Couder2019-09-041-15/+9
| | | | | | | | | | | | | | | IssuableBaseService::filter_labels() has been refactored to call a new `label_ids_to_filter` method.
| * | Avoid creating labels when removing themChristian Couder2019-09-043-6/+8
| | | | | | | | | | | | | | | IssuableBaseService has been updated so that labels are not created when push options to remove them are received.
| * | Support adding and removing labels w/ push optsChristian Couder2019-09-044-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MergeRequests::PushOptionsHandlerService has been updated to allow adding and removing labels to a merge request using git push options. To create a new merge request and add 2 labels to it: git push -u origin -o merge_request.create \ -o merge_request.label="My label 1" \ -o merge_request.label="My label 2" To update an existing merge request and remove a label while adding a different label: git push -u origin -o merge_request.label="My added label" \ -o merge_request.unlabel="My removed label" Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/64320
* | | New interruptible attribute supported in YAML parsing.Cédric Tabin2019-09-051-5/+15
| | | | | | | | | | | | | | | | | | | | | Since it is not possible to dynamically detect if a job is automatically cancellable or not, a this new attribute is necessary. Moreover, it let the maintainer of the repo to adjust the behaviour of the auto cancellation feature to match exactly what he needs.
* | | Add structure to support EE feature of COARKerri Miller2019-09-051-1/+6
| |/ |/| | | | | | | | | | | These are the structural changes for supporting the EE feature of moving "code_owner_approval_required" state from existing on a project to being on the protected branches individually, allowing for CODEOWNER validation on push events.
* | Bring method back that was mistakenly removedJoão Cunha2019-09-042-1/+9
| | | | | | | | - We're also improving specs to avoid this could happen again
* | Add service to transfer group milestonesEugenia Grieff2019-09-044-0/+122
| | | | | | | | | | | | | | | | | | | | | | - Add new service that transfers milestones from a group to a project - Include new service in Projects transfer service - Include FromUnion module in Milestone model to use in transfer service - Add specs for new milestones service - Add specs for transferring milestones in project transfer service
* | Merge branch 'osw-record-repo-push-events' into 'master'James Lopez2019-09-041-4/+4
|\ \ | | | | | | | | | | | | Backport EE "Track repository pushes as audit events" See merge request gitlab-org/gitlab-ce!32304
| * | Backport "Track repository pushes as audit events"Oswaldo Ferreira2019-09-041-4/+4
| | |
* | | Avoid calling freeze on already frozen strings in app/servicesdineshpanda2019-09-0411-14/+14
|/ /
* | Create an event on epic actionsJan Provaznik2019-09-031-3/+10
| | | | | | | | | | Creates new event when an epic is created, closed, reopened or commented.
* | Added relationships between Release and MilestoneEtienne Baqué2019-09-033-1/+27
| | | | | | | | | | | | Modified schema via migrations. Added one-to-one relationship between the two models. Added changelog file
* | Merge branch 'change-role-system-hook' into 'master'Rémy Coutable2019-09-031-0/+2
|\ \ | | | | | | | | | | | | | | | | | | Add system hooks for project/group membership updates Closes gitlab-ee#12252 See merge request gitlab-org/gitlab-ce!32371
| * | Add system hooks for project/group membership updatesBrandon Williams2019-09-021-0/+2
| | | | | | | | | | | | | | | | | | | | | When updating group and project members, new system hooks `user_update_for_group` and `user_update_for_team` will be executed. Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/12252
* | | If user can push to docker then it can delete tooGiorgenes Gelatti2019-09-031-1/+9
| | | | | | | | | | | | | | | | | | | | | Extends the permission of $CI_REGISTRY_USER to allow them to delete tags in addition to just pushing. https://gitlab.com/gitlab-org/gitlab-ce/issues/40096
* | | Add X-GitLab-NotificationReason header to note emailsadd-notification-reason-to-note-emailsSean McGivern2019-09-021-1/+1
| | | | | | | | | | | | | | | | | | The 'assigned' reason doesn't apply to notes, but the other two can ('mentioned' and 'own_activity'), so we can still use this for note emails.
* | | quick action label must be first in issue commentManeschi Romain2019-09-021-1/+1
| |/ |/|
* | Merge branch '46686-move-k8s-services-out-of-gcp-namespace' into 'master'66783-usage-ping-for-slack-integrationsThong Kuah2019-09-019-250/+242
|\ \ | | | | | | | | | | | | Move generic k8s services out of GCP namespace See merge request gitlab-org/gitlab-ce!32310
| * | Move generic k8s services out of GCP namespace46686-move-k8s-services-out-of-gcp-namespaceTiger2019-08-289-250/+242
| |/ | | | | | | | | These services aren't specific to GCP, and will be used for AWS as part of https://gitlab.com/gitlab-org/gitlab-ce/issues/46686
* | Merge branch ↵Nick Thomas2019-09-011-1/+1
|\ \ | | | | | | | | | | | | | | | | | | '66139-remove-kubernetes_namespace_per_environment-feature-flag' into 'master' Remove :kubernetes_namespace_per_environment feature flag See merge request gitlab-org/gitlab-ce!32140
| * | Remove :kubernetes_namespace_per_environment feature flag66139-remove-kubernetes_namespace_per_environment-feature-flagTiger2019-08-301-1/+1
| | | | | | | | | | | | Feature flag has been defaulting to `true` since 12.2
* | | Limit access request email to 10 most recently active owners/maintainersManoj MJ2019-08-301-5/+10
|/ / | | | | | | | | | | This change limits the number of emails for new access requests notifications to 10 most recently active owners/maintainers
* | Allow be_url to specify the typeAlex Kalderimis2019-08-301-5/+5
| | | | | | | | | | This allows the be_url matcher to be more specific. By default, it only matches HTTP and HTTPS URIs.
* | Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqRobert Speicher2019-08-294-17/+34
|\ \
| * \ Merge branch 'security-enable-image-proxy' into 'master'GitLab Release Tools Bot2019-08-291-1/+14
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Use image proxy to mitigate stealing ip addresses Closes #2812 See merge request gitlab/gitlabhq!2926
| | * | Add support for using a Camo proxy serverBrett Walker2019-08-231-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | User images and videos will get proxied through the Camo server in order to keep malicious sites from collecting the IP address of users.
| * | | Merge branch 'security-project-import-bypass' into 'master'GitLab Release Tools Bot2019-08-291-11/+16
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Project visibility restriction bypass See merge request gitlab/gitlabhq!3306
| | * | | Fix project import restricted visibility bypassGeorge Koltsov2019-08-151-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Gitlab::VisibilityLevelChecker that verifies selected project visibility level (or overridden param) is not restricted when creating or importing a project
| * | | | Merge branch 'security-add-job-activity-limit-ce' into 'master'GitLab Release Tools Bot2019-08-291-1/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce JobActivity limit for alive jobs Closes gitlab-ee#376 See merge request gitlab/gitlabhq!3339
| | * | | | Add active_jobs_limit to plans tableFabio Pitino2019-08-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a port from EE changes where we introduce a new limit for Plan model. https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/1182
| * | | | | Merge branch 'security-64711-fix-commit-todos' into 'master'GitLab Release Tools Bot2019-08-291-4/+2
| |\ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | Send TODOs for comments on commits correctly See merge request gitlab/gitlabhq!3361
| | * | | | Send TODOs for comments on commits correctlyNick Thomas2019-08-231-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present, the TodoService uses the `:read_project` ability to decide whether a user can read a note on a commit. However, commits can have a visibility level that is more restricted than the project, so this is a security issue. This commit changes the code to use the `:read_commit` ability in this case instead, which ensures TODOs are only generated for commit notes if the users can see the commit.
* | | | | | DRY check progress servicesJoão Cunha2019-08-293-63/+55
| | | | | | | | | | | | | | | | | | | | | | | | Extract duplicated code from two similar classes into a parent one.
* | | | | | Fix snippets API not working with visibility levelsh-fix-snippet-visibility-apiStan Hu2019-08-284-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a restricted visibility level of `private` is set in the instance, creating a snippet with the `visibility` level would always fail. This happened because: 1. `params[:visibility]` was a string (e.g. "public") 2. `CreateSnippetService` and `UpdateSnippetService` only looked at `params[:visibility_level]`, which was `nil`. To fix this, we: 1. Make `CreateSnippetService` look at the newly-built `snippet.visibility_level`, since the right value is assigned by the `VisibilityLevel#visibility=` method. 2. Modify `UpdateSnippetService` to handle both `visibility_level` and `visibility` parameters. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66050
* | | | | | Do not persist translated system notes63262-notes-are-persisted-with-the-user-s-localeSean McGivern2019-08-281-4/+6
| | | | | |
* | | | | | Save board lists collapsed settingFelipe Artur2019-08-282-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | Persists if a board list is collapsed for each user.
* | | | | | Merge branch 'sh-lfs-object-batches' into 'master'Rémy Coutable2019-08-281-5/+24
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes LFS object link process OIDs in batches Closes #66274 See merge request gitlab-org/gitlab-ce!32268
| * | | | | Makes LFS object linker process OIDs in batchessh-lfs-object-batchesStan Hu2019-08-271-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During a project import, `LfsLinkService` attempts to link `LfsObjects` that have not already been associated with a project. It's possible for a large repo to have thousands of OIDs, which can cause long database query and parsing times. By processing a batch of 1000 at a time, we can reduce that time at the expense of a few more SQL queries. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66274
* | | | | | CE-specific changes for designs `user_notes_count`Luke Duncalfe2019-08-271-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes call `#after_note_created` and `#after_note_destroyed` on their noteable in callbacks, so the noteable can perform tasks particular to them, like cache expiry. This is in preparation of the EE-specific class `DesignManagement::Design` clearing its `user_notes_count` cache when its note are created or destroyed. Refactoring Rspec behaviour testing of a counter caching service into a shared example. https://gitlab.com/gitlab-org/gitlab-ee/issues/13353
* | | | | Add usage pings for merge request creatingIgor2019-08-261-0/+1
| | | | | | | | | | | | | | | | | | | | Code Review Usage Ping for Create SMAU
* | | | | Merge branch ↵Nick Thomas2019-08-261-1/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '66443-unrecoverable-configuration-loop-in-external-auth-control' into 'master' Resolve "Unrecoverable configuration loop in external auth control" Closes #66443 See merge request gitlab-org/gitlab-ce!32102
| * | | | | Add test, reduce complexityRobert Schilling2019-08-221-2/+5
| | | | | |
| * | | | | Don't check external authorization when disabling the serviceRobert Schilling2019-08-221-1/+2
| | | | | |
* | | | | | Add edit_note and spec for editing quick actionsPatrick Derichs2019-08-261-10/+56
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call QuickActionsService on Note update Add support for notes which just contain commands after editing Return http status gone (410) if note was deleted Temporary frontend addition so it is not failing when a note is deleted Move specs to shared examples Fix rubocop style issue Deleting note on frontend when status is 410 Use guard clause for note which got deleted Simplified condition for nil note This method should no longer be called with nil note Refactoring of execute method to reduce complexity Move errors update to delete_note method Note is now deleted visually when it only contains commands after update Add expectation Fix style issues Changing action to fix tests Add tests for removeNote and update deleteNote expectations
* | | | | Add a link to docs in project descriptionReuben Pereira2019-08-231-219/+0
| |/ / / |/| | | | | | | | | | | Add to the service and migration both.