summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Kamil Trzcinski2016-08-1615-109/+267
|\ | | | | | | pipeline-hooks-without-slack
| * Merge branch 'issue_18656' into 'master' Douwe Maan2016-08-169-38/+241
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Load issue templates from repository part of #18656 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4981
| | * Load issues and merge requests templates from repositoryFelipe Artur2016-08-169-38/+241
| | |
| * | Merge remote-tracking branch 'origin/master' into ee-581-backport-changesee-581-backport-changesTimothy Andrew2016-08-161-6/+3
| |\ \ | | |/
| | * Merge remote-tracking branch 'dev/master'Ruben Davila2016-08-161-6/+3
| | |\
| | | * Merge branch 'fix/export-att-inclusion' into 'master' Douwe Maan2016-08-151-6/+3
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix attribute inclusion import/export config ignored in some cases In the `import_export.yml` file we define the inclusion of some of the attributes. For some reason, this isn't working in certain cases - very unfortunate this includes `user`. This has been introduced in 8.10.3. Related https://gitlab.com/gitlab-org/gitlab-ce/issues/20802 See merge request !1982
| | | | * refactor parse_hash based on feedbackJames Lopez2016-08-111-3/+3
| | | | |
| | | | * Fix attribute inclusion in import/export config ignored in some casesJames Lopez2016-08-111-6/+3
| | | | |
| * | | | Fix failing tests relating to backporting ee!581.Timothy Andrew2016-08-161-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. `GitPushService` was still using `{merge,push}_access_level_attributes` instead of `{merge,push}_access_levels_attributes`. 2. The branches API creates access levels regardless of the state of the `developers_can_{push,merge}` parameters. This is in line with the UI, where Master access is the default for a new protected branch. 3. Use `after(:build)` to create access levels in the `protected_branches` factory, so that `factories_spec` passes. It only builds records, so we need to create access levels on `build` as well.
| * | | | Improve EE compatibility with protected branch access levels.Timothy Andrew2016-08-162-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Change a few incorrect `access_level` to `access_levels.first` that were missed in e805a64. 2. `API::Entities` can iterate over all access levels instead of just the first one. This makes no difference to CE, and makes it more compatible with EE.
| * | | | Backport changes from gitlab-org/gitlab-ee!581 to CE.Timothy Andrew2016-08-161-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | !581 has a lot of changes that would cause merge conflicts if not properly backported to CE. This commit/MR serves as a better foundation for gitlab-org/gitlab-ee!581. = Changes = 1. Move from `has_one {merge,push}_access_level` to `has_many`, with the `length` of the association limited to `1`. This is _effectively_ a `has_one` association, but should cause less conflicts with EE, which is set to `has_many`. This has a number of related changes in the views, specs, and factories. 2. Make `gon` variable loading more consistent (with EE!581) in the `ProtectedBranchesController`. Also use `::` to prefix the `ProtectedBranches` services, because this is required in EE. 3. Extract a `ProtectedBranchAccess` concern from the two access level models. This concern only has a single `humanize` method here, but will have more methods in EE. 4. Add `form_errors` to the protected branches creation form. This is not strictly required for EE compatibility, but was an oversight nonetheless.
| * | | Merge branch 'akismet-submittable' into 'master' Robert Speicher2016-08-152-49/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submit to Akismet Part 1 (Issues) Related to #5932 #5573 gitlab-com/infrastructure#14 See merge request !5538
| | * | | Refactored AkismetHelper into AkismetService and cleaned up `Spammable`Patricio Cano2016-08-152-83/+0
| | | | | | | | | | | | | | | | | | | | - Refactored SpamCheckService into SpamService
| | * | | Allow `SpamLog` to be submitted as hamPatricio Cano2016-08-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | - Added `submitted_as_ham` to `SpamLog` to mark which logs have been submitted to Akismet. - Added routes and controller action.
| | * | | Refactored spam related code even furtherPatricio Cano2016-08-152-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed unnecessary column from `SpamLog` - Moved creation of SpamLogs out of its own service and into SpamCheckService - Simplified code in SpamCheckService. - Moved move spam related code into Spammable concern
| | * | | Complete refactor of the `Spammable` concern and tests:Patricio Cano2016-08-152-1/+35
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | - Merged `AkismetSubmittable` into `Spammable` - Clean up `SpamCheckService` - Added tests for `Spammable` - Added submit (ham or spam) options to `AkismetHelper`
* | | | Merge branch 'fix-failing-tests' into pipeline-hooks-without-slackKamil Trzcinski2016-08-1510-69/+296
|\ \ \ \ | |/ / /
| * | | Add small corrections to test coverage report badgeGrzegorz Bizon2016-08-151-2/+2
| | | |
| * | | Add metadata and template methods for coverage badgeGrzegorz Bizon2016-08-151-0/+8
| | | |
| * | | Extract base abstract template for badgesGrzegorz Bizon2016-08-153-35/+51
| | | |
| * | | Add template class for coverage report badgeGrzegorz Bizon2016-08-151-0/+69
| | | |
| * | | Extract the abstract base class of badge metadataGrzegorz Bizon2016-08-153-22/+42
| | | |
| * | | Add coverage report badge metadata classGrzegorz Bizon2016-08-151-0/+38
| | | |
| * | | Implement the main class of test coverage badgeGrzegorz Bizon2016-08-151-1/+30
| | | |
| * | | Refactor badge template and metadata classesGrzegorz Bizon2016-08-154-14/+19
| | | |
| * | | Move badges to separate modules and add base classGrzegorz Bizon2016-08-157-49/+74
| | | |
| * | | Add empty test coverage badge class and specsGrzegorz Bizon2016-08-151-0/+17
| |/ /
* | | Merge remote-tracking branch 'origin/master' into pipeline-hooks-without-slackKamil Trzcinski2016-08-153-7/+7
|\ \ \ | |/ /
| * | Merge branch '20842-todos-queries-cache' into 'master' Yorick Peterse2016-08-151-5/+3
| |\ \ | | | | | | | | | | | | | | | | Try to get back todo's cache or at least avoid hitting the database See merge request !5789
| | * | Recover usage of Todos counter cache20842-todos-queries-cachePaco Guzman2016-08-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We’re being kept up to date the counter data but we’re not using it. The only thing which is not real if is the number of projects that the user read changes the number of todos can be stale for some time. The counters will be sync just after the user receives a new todo or mark any as done
| | * | Use cache for todos counter calling TodoServicePaco Guzman2016-08-121-1/+1
| | | |
| * | | Merge branch 'change-access-update' into 'master' Yorick Peterse2016-08-151-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Change the order of the access rules to check simpler first, and add specs See merge request !5799
| | * | | Change the order of the access rules to check simpler first, and add specschange-access-updateAlejandro Rodríguez2016-08-121-1/+1
| | |/ /
| * | | Fix a memory leak caused by Banzai::Filter::SanitizationFilterfix/sanitization-filter-leakAhmad Sherif2016-08-141-1/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Banzai::Filter::SanitizationFilter#customize_whitelist, we append three lambdas that has reference to the SanitizationFilter instance, which in turn (potentially) has a reference to the following chain: context hash -> Project instance -> Repository instance -> lookup hash -> various Rugged instances -> various mmap-ed git pack files. All of the above is not garbage collected because the array we append the lambdas to is the constant HTML::Pipeline::SanitizationFilter::WHITELIST.
* | | Merge branch 'improve-pipeline-processing' into pipeline-hooks-without-slackKamil Trzcinski2016-08-125-23/+52
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | # Conflicts: # app/models/ci/pipeline.rb # app/models/commit_status.rb # app/services/ci/create_pipeline_service.rb # spec/models/ci/pipeline_spec.rb
| * | api for generating new merge requestScott Le2016-08-115-23/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRY code + fix rubocop Add more test cases Append to changelog DRY changes list find_url service for merge_requests use GET for getting merge request links remove files rename to get_url_service reduce loop add test case for cross project refactor tiny thing update changelog
* | | Simplify the name for data builder, feedback:Lin Jen-Shin2016-08-124-4/+4
| | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13671791
* | | Prefer extend self over module_function, feedback:Lin Jen-Shin2016-08-124-4/+4
| | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13672004 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13810498
* | | Remove stage parameter from send payloadKamil Trzcinski2016-08-111-5/+1
| | |
* | | Merge remote-tracking branch 'origin/master' into pipeline-hooks-without-slackKamil Trzcinski2016-08-1120-840/+303
|\ \ \ | |/ / | | | | | | | | | | | | | | | # Conflicts: # app/models/ci/pipeline.rb # app/services/ci/create_pipeline_service.rb # spec/models/project_services/hipchat_service_spec.rb
| * | Merge branch 'remove-grack-lfs' into 'master' Rémy Coutable2016-08-113-590/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Grack::Auth: part 2 (LFS) Deprecate Grack::Auth and handle LFS in Rails controllers under the Project namespace. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14501 See merge request !5369
| | * \ Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into ↵Jacob Vosmaer2016-08-0998-786/+1746
| | |\ \ | | | | | | | | | | | | | | | remove-grack-lfs
| | * | | Remove obsolete codeJacob Vosmaer2016-07-223-590/+0
| | | | |
| * | | | Merge branch 'refactor-builds-creation-service' into 'master' Rémy Coutable2016-08-111-1/+1
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor pipeline creation service ## What does this MR do? This refactors GitLab CI build processing: all builds for pipeline are pre-created when a pipeline object is created. The builds are created with a new introduced status `created`. The builds are then automatically promoted to `pending` when a previous stage do succeed. This significantly simplifies pipeline processing code solving a lot of problems of lazily initialisation of previous approach (builds were created on-demand). ## Why was this MR needed? The previous mechanism had a lot of flows (shown in related issues) in how it work, but also in code design. Removing cross model-service-library dependencies. The current approach moves a build creation to single place `CreatePipelineService` and removes a dynamic dependency on `config_processor` significantly simplifying a build creation and pipeline processing. Pipeline processing is implemented in `ProcessPipelineService`. This also allows to easily extend GitLab with Manual Actions which is part of 8.10 direction issue. ## Migration problem ~~This MR removes the a on-demand creation of builds in pipelines. Pipelines that are running and are in mid-stage (some stages started, but not all) will not be fully evaluated after application restart. This happens, because the code responsible for on-demand creation is removed. There's no easy way to migrate existing pipelines, other than doing offline migration and putting pipeline processing in migration code (which seems to be a really bad idea).~~ To support old pipelines I added a lazy initialization of builds if none is found. ## What are the relevant issue numbers? Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/12839 Solves: https://gitlab.com/gitlab-org/gitlab-ce/issues/18644 https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/289 Allows to easily implement: https://gitlab.com/gitlab-org/gitlab-ce/issues/17010 ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5295
| | * | | | Pre-create all builds for Pipeline when a trigger is receivedKamil Trzcinski2016-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change simplifies a Pipeline processing by introducing a special new status: created. This status is used for all builds that are created for a pipeline. We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped). This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled. This also allows us to visualise a full pipeline (with created builds). This also removes an after_touch used for updating a pipeline state parameters. Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved.
| * | | | | Merge branch '10772-fix-urlencoded-branchname' into 'master' Rémy Coutable2016-08-111-1/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix front-end for branches that happen to contain urlencoding escape characters (e.g. %) _Originally opened at !3574 by @ewiltshi._ - - - Adding a branch with a name like "foo%20bar" (via command-line) and setting it to the project's default branch causes the project "show" page to 404 for that project. "assign_ref_vars" unescapes the branch name ("foo%20bar" ==> "foo bar"), making GitLab look for a non-existent branch. This MR adds logic to skip the URL unescaping step in "assign_ref_vars". Fixes #10772, #14992, #15304. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] Added for this feature/bug - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5770
| | * | | | | Fix front-end for branches that happen to contain urlencoding escape ↵10772-fix-urlencoded-branchnameElliot2016-08-111-1/+1
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | characters (e.g. %) Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | | | Merge branch 'file_exists_deprecated' into 'master' Rémy Coutable2016-08-116-18/+18
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `File::exist?` instead of `File::exists?` Each `File::exists?` replaced to `File::exist?`. Since version ruby-2.2.0, method `File::exists?` is deprecated. See merge request !5747
| | * | | | | Use `File::exist?` instead of `File::exists?`bogdanvlviv2016-08-116-18/+18
| | |/ / / / | | | | | | | | | | | | | | | | | | Since version ruby-2.2.0, method `File::exists?` is deprecated.
| * | | | | Merge branch '18583-implement-access-request-to-project-group-api' into ↵Rémy Coutable2016-08-118-229/+282
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Add group members API endpoints to request access and approve requests ## What does this MR do? Add group members API endpoints to request access and approve requests. ## Are there points in the code the reviewer needs to double check? I chose to factorize the group/project members API as well as the new group/project access requests API. I initially also created new services to centralize the permission checks related to actions on members, but this was out of scope and this MR is already quite big so I opened a temp MR at !5566 based on this one. ## Why was this MR needed? To finish the "request access" feature. ## What are the relevant issue numbers? Closes #18583. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4833