summaryrefslogtreecommitdiff
path: root/spec/services
Commit message (Collapse)AuthorAgeFilesLines
* Resolve "/assign me quick action doesn't work if there is extra white space"Cindy Pallares 🦉2018-10-191-41/+38
|
* Merge branch 'ce-5987-group-file-templates' into 'master'Robert Speicher2018-10-191-0/+3
|\ | | | | | | | | CE backport of changes to suppport group file templates See merge request gitlab-org/gitlab-ce!22310
| * Harden a specNick Thomas2018-10-191-0/+3
| |
* | Merge branch 'bvl-remove-forked-project-link' into 'master'Sean McGivern2018-10-194-10/+36
|\ \ | | | | | | | | | | | | | | | | | | Remove ForkedProjectLink model Closes #38883 See merge request gitlab-org/gitlab-ce!22226
| * | Remove the `ForkedProjectLink` modelBob Van Landuyt2018-10-194-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the `ForkedProjectLink` model that has been replaced by the `ForkNetworkMember` and `ForkNetwork` combination. All existing relations have been adjusted to use these new models. The `forked_project_link` table has been dropped. The "Forks" count on the admin dashboard has been updated to count all `ForkNetworkMember` rows and deduct the number of `ForkNetwork` rows. This is because now the "root-project" of a fork network also has a `ForkNetworkMember` row. This count could become inaccurate when the root of a fork network is deleted.
* | | Catch `RedirectionTooDeep` Exception in webhooksHeinrich Lee Yu2018-10-191-1/+1
| |/ |/|
* | Add support for JSON logging for audit eventsStan Hu2018-10-181-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will add audit_json.log that writes one line per audit event. For example: { "severity":"INFO", "time":"2018-10-17T17:38:22.523Z", "author_id":3, "entity_id":2, "entity_type":"Project", "change":"visibility", "from":"Private", "to":"Public", "author_name":"John Doe4", "target_id":2, "target_type":"Project", "target_details":"namespace2/project2" }
* | Fix Groups::UpdateService#execute not returning correct error codeStan Hu2018-10-181-0/+6
| | | | | | | | | | This was causing problems in EE, where audit events were being generated even if the project failed to save.
* | Does not allow an import_url with SSH protocolDouglas Barbosa Alexandre2018-10-151-1/+1
| |
* | Merge branch '34758-refactor-cluster-services' into 'master'Dmitriy Zaporozhets2018-10-152-2/+2
|\ \ | | | | | | | | | | | | Refactor Cluster services to enable groups or projects See merge request gitlab-org/gitlab-ce!22181
| * | Pass in project as kwarg for CreateServiceThong Kuah2018-10-152-2/+2
| |/ | | | | | | | | | | | | | | | | This enables us to have other options in the future such as passing in `group:`. Also, remove project arg from UpdateService, as un-used. This will help group cluster controller to re-use this services.
* | Remove un-used inheritance from serviceThong Kuah2018-10-153-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | Remove the inheritance from ::BaseService which is causing us to inherit the initializer that has project as the first arg, as we will not have access to project with forthcoming group clusters. Also call install service from create service - 1 less thing to re-use Extract TestRequest code into a spec helper. Given that we need different behaviour for Rails 5.0 (and again in Rails 5.1!), it's handy to have that branching behaviour in one place
* | Move non-controller code into dedicated serviceThong Kuah2018-10-151-0/+63
|/ | | | | | | | | | This should help with code re-use when we create applications for group level cluster next. Change `find_or_initialize_by` to explicitly find or build the right association based on the application name. The benefit here is that we use the associations on @cluster rather than querying from the other side of the association.
* Fix project deletion when there is a export availableStan Hu2018-10-101-3/+20
| | | | | | | | | | | | | | | | Project deletions were failing with "Can't modify frozen hash" because: 1. Project#remove_exports was called in the after_destroy hook 2. This would remove the file and update ImportExportUpload 3. ImportExportUpload#save would attempt to write to a destroyed model To avoid this, we just check if ImportExportUpload has been destroyed before attempting to save it. This would have a side effect of not running after_commit hooks to delete the repository on disk, making it impossible to delete the project entirely. Closes #52362
* Merge branch 'issue_43097' into 'master'Sean McGivern2018-10-051-0/+39
|\ | | | | | | | | | | | | Move related branches to service Closes #43097 See merge request gitlab-org/gitlab-ce!22094
| * Move issue related_branches to serviceFelipe Artur2018-10-041-0/+39
| | | | | | | | | | Moves the related_branches method from Issue model to RelatedBranchesService
* | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-051-0/+21
|\ \
| * | Make GitLab pages support access controlTuomo Ala-Vannesluoma2018-10-051-0/+21
| | |
* | | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-053-15/+38
|\ \ \ | |/ /
| * | Fix N+1 for notification recipients on private projectsSean McGivern2018-10-041-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we don't call #to_a, we're relying on the members already being loaded from elsewhere. Otherwise we'll do a separate query for each user: [1] pry(main)> Project.first.team.members.include?(User.first) Project Load (0.7ms) SELECT "projects".* FROM "projects" ORDER BY "projects"."id" ASC LIMIT 1 ↳ (pry):3 User Load (1.8ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1 ↳ (pry):3 User Exists (0.6ms) SELECT 1 AS one FROM "users" INNER JOIN "project_authorizations" ON "users"."id" = "project_authorizations"."user_id" WHERE "project_authorizations"."project_id" = $1 AND "users"."id" = $2 LIMIT 1 [["project_id", 1], ["id", 1]] ↳ (pry):3 => true [2] pry(main)> Project.first.team.members.to_a.include?(User.first) Project Load (12.8ms) SELECT "projects".* FROM "projects" ORDER BY "projects"."id" ASC LIMIT 1 ↳ (pry):1 User Load (9.6ms) SELECT "users".* FROM "users" INNER JOIN "project_authorizations" ON "users"."id" = "project_authorizations"."user_id" WHERE "project_authorizations"."project_id" = $1 [["project_id", 1]] ↳ (pry):1 User Load (0.6ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1 ↳ (pry):1 => true
| * | Fix N+1 for notification recipients in subscribersSean McGivern2018-10-041-12/+35
| | |
| * | Merge branch 'fix-todo-cops' into 'master'Rémy Coutable2018-10-041-1/+1
| |\ \ | | | | | | | | | | | | | | | | Fix todo cops See merge request gitlab-org/gitlab-ce!21850
| | * | Fix SpaceBeforeFirstArg copSemyon Pupkov2018-09-201-1/+1
| | | |
| * | | Create labels_as_hash_ concern, modify params for methodccr/48930_extract_logic_to_concernChantal Rollison2018-10-031-2/+2
| | |/ | |/|
* | | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-046-16/+17
|\ \ \ | |/ /
| * | Merge branch 'remove-rugged' into 'master'Douwe Maan2018-10-036-16/+17
| |\ \ | | | | | | | | | | | | | | | | Remove Gitlab::Git::Repository#rugged See merge request gitlab-org/gitlab-ce!22039
| | * | Remove Gitlab::Git::Repository#rugged and Gollum codeAlejandro Rodríguez2018-10-026-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup code, and refactor tests that still use Rugged. After this, there should be no Rugged code that access the instance's repositories on non-test environments. There is still some rugged code for other tasks like the repository import task, but since it doesn't access any repository storage path it can stay.
* | | | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-031-1/+1
|\ \ \ \ | |/ / /
| * | | CE Resolve "Refactor code quality similar to JUnit tests"Matija Čupić2018-10-021-1/+2
| |/ /
* | | Stub feature flag for specShinya Maeda2018-10-021-0/+4
| | |
* | | Add feature flag spec for process_build_serviceShinya Maeda2018-10-021-1/+15
| | |
* | | Fix specShinya Maeda2018-10-021-1/+1
| | |
* | | Fix specShinya Maeda2018-10-021-1/+1
| | |
* | | Add spec for ProcessBuildServiceShinya Maeda2018-10-021-28/+171
| | |
* | | Fix spec failureShinya Maeda2018-10-021-4/+1
| | |
* | | Fix coding style offenceShinya Maeda2018-10-021-9/+12
| | |
* | | Add spec for BuildScheduleWorker and RunScheduledBuildServiceShinya Maeda2018-10-021-0/+62
| | |
* | | Add Spec for ProcessPipelineServiceShinya Maeda2018-10-021-1/+202
| | |
* | | Fix process build service specShinya Maeda2018-10-021-3/+8
| | |
* | | Fix process build service specShinya Maeda2018-10-022-16/+61
| | |
* | | Fix retry_build_service_specShinya Maeda2018-10-021-2/+4
|/ /
* | Merge remote-tracking branch 'dev/master'Bob Van Landuyt2018-10-012-2/+2
|\ \
| * \ Merge branch 'security-gcp-token-exposed-by-kubernetes' into 'master'Bob Van Landuyt2018-10-012-2/+2
| |\ \ | | | | | | | | | | | | | | | | [master] - Do not persist errors from Kubernetes calls See merge request gitlab/gitlabhq!2506
| | * | Do not persist errors from Kubernetes callsMayra Cabrera2018-09-172-2/+2
| | | |
* | | | Merge branch 'feature/set-public-email-through-api' into 'master'Rémy Coutable2018-10-011-0/+43
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set public email through api Closes #37675 See merge request gitlab-org/gitlab-ce!21938
| * | | | allow users api to set public_emailAlexis Reigel2018-10-011-1/+2
| | | | |
| * | | | add missing allowed attributesAlexis Reigel2018-10-011-0/+42
| | | | |
* | | | | Extend reports to support security featuresOlivier Gonzalez2018-09-271-4/+14
| | | | |
* | | | | Merge branch '43832-adds-chdmod-to-commits-actions-api' into 'master'Rémy Coutable2018-09-271-1/+35
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows to work with execute permissions in GitLab API Closes #43832 See merge request gitlab-org/gitlab-ce!21866
| * | | | | Adds chmod action to POST /projects/:id/repository/commits APIJacopo2018-09-271-1/+35
| | |/ / / | |/| | | | | | | | | | | | | With this action the user can update the execute_filemode of a given file in the repository.