summaryrefslogtreecommitdiff
path: root/spec/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix behavior around commands with optional arguments4273-slash-commandsDouwe Maan2016-08-182-29/+48
|
* Remove unneeded aliasesDouwe Maan2016-08-181-8/+8
|
* Fix specs and implement fixes based on failing specsDouwe Maan2016-08-171-49/+15
|
* Merge branch 'master' into 4273-slash-commandsDouwe Maan2016-08-1618-99/+677
|\ | | | | | | | | # Conflicts: # app/services/issues/create_service.rb
| * Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Kamil Trzcinski2016-08-166-38/+223
| |\ | | | | | | | | | pipeline-hooks-without-slack
| | * Load issues and merge requests templates from repositoryFelipe Artur2016-08-164-2/+221
| | |
| | * Merge remote-tracking branch 'dev/master'Ruben Davila2016-08-161-1/+2
| | |\
| | | * Merge branch 'fix/export-att-inclusion' into 'master' Douwe Maan2016-08-151-1/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | | * Fix attribute inclusion in import/export config ignored in some casesJames Lopez2016-08-111-1/+2
| | | | |
| | * | | Merge branch 'akismet-submittable' into 'master' Robert Speicher2016-08-151-35/+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-151-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | - Refactored SpamCheckService into SpamService
| | | * | | Refactored spam related code even furtherPatricio Cano2016-08-151-11/+0
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
| * | | | Merge branch 'fix-failing-tests' into pipeline-hooks-without-slackKamil Trzcinski2016-08-157-56/+314
| |\ \ \ \ | | |/ / /
| | * | | Add small corrections to test coverage report badgeGrzegorz Bizon2016-08-151-3/+3
| | | | |
| | * | | Add metadata and template methods for coverage badgeGrzegorz Bizon2016-08-151-0/+12
| | | | |
| | * | | Add template class for coverage report badgeGrzegorz Bizon2016-08-151-0/+130
| | | | |
| | * | | Extract the abstract base class of badge metadataGrzegorz Bizon2016-08-152-0/+12
| | | | |
| | * | | Add coverage report badge metadata classGrzegorz Bizon2016-08-151-0/+24
| | | | |
| | * | | Extract common badge metadata test examplesGrzegorz Bizon2016-08-152-19/+23
| | | | |
| | * | | Implement the main class of test coverage badgeGrzegorz Bizon2016-08-151-8/+68
| | | | |
| | * | | Refactor badge template and metadata classesGrzegorz Bizon2016-08-153-44/+39
| | | | |
| | * | | Move badges to separate modules and add base classGrzegorz Bizon2016-08-152-4/+6
| | | | |
| | * | | Add empty test coverage badge class and specsGrzegorz Bizon2016-08-151-0/+19
| | |/ /
| * | | Merge remote-tracking branch 'origin/master' into pipeline-hooks-without-slackKamil Trzcinski2016-08-151-0/+99
| |\ \ \ | | |/ /
| | * | Change the order of the access rules to check simpler first, and add specschange-access-updateAlejandro Rodríguez2016-08-121-0/+99
| | | |
| * | | Merge branch 'improve-pipeline-processing' into pipeline-hooks-without-slackKamil Trzcinski2016-08-122-8/+39
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # app/models/ci/pipeline.rb # app/models/commit_status.rb # app/services/ci/create_pipeline_service.rb # spec/models/ci/pipeline_spec.rb
| * | | 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 described_class, feedback:Lin Jen-Shin2016-08-123-3/+3
| | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13810811 And other similar places.
| * | | Enhance a pipeline event tests to analyse number of returned buildsKamil Trzcinski2016-08-111-2/+6
| | | |
| * | | Merge remote-tracking branch 'origin/master' into pipeline-hooks-without-slackKamil Trzcinski2016-08-114-13/+28
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # app/models/ci/pipeline.rb # app/services/ci/create_pipeline_service.rb # spec/models/project_services/hipchat_service_spec.rb
| * \ \ \ Merge remote-tracking branch 'upstream/master' into pipeline-hooks-without-slackLin Jen-Shin2016-08-1137-218/+504
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (233 commits) Fix awardable button mutuality loading spinners Update CHANGELOG for 8.10.5 Clean up project destruction Small refactor of doc/development/README.md Avoid commit lookup on diff_helper Removed extra newline from redis_spec.rb Used cached value of project count to reduce DB load Remove duplicate link_to statements Mention add_column_with_default in downtime guide Add missing space to generic badge template Rename `run` task helper method to prevent conflict with StateMachine Add a method in Project to return a cached value of total count of projects spellcheck Add svg guidelines to ui guide Add Changelog entry for Grape upgrade [ci skip] Fix Grape tests. Retain old behavior Update Grape from 0.13.0 to 0.15.0. adds second batch of tests changed to active tense fixes part1 of files to start using active tense ...
| * | | | | Move those builders to their own namespace, feedback:Lin Jen-Shin2016-08-043-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13540099
| * | | | | Implement pipeline hooks, extracted from !5525Lin Jen-Shin2016-08-021-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | Closes #20115
* | | | | | Fixed specs and fixes based on failing specsDouwe Maan2016-08-163-176/+222
| | | | | |
* | | | | | Refactor slash command definitionDouwe Maan2016-08-121-15/+15
| | | | | |
* | | | | | Simplify the slash commands DSL to store action blocks instead of creating ↵Rémy Coutable2016-08-132-55/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | methods Other improvements: - Ensure slash commands autocomplete doesn't break when noteable_type is not given - Slash commands: improve autocomplete behavior and /due command - We don't display slash commands for note edit forms. - Add tests for reply by email with slash commands - Be sure to execute slash commands after the note creation in Notes::CreateService Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | New TodoService#todo_exists? methodRémy Coutable2016-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Accept blocks for `.desc` and `.condition` slash commands DSLRémy Coutable2016-08-131-19/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, pass options as instance variables, making the DSL more user-friendly / natural. Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Make slash commands contextualRémy Coutable2016-08-131-15/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Return only slash commands that make sense for the current noteable - Allow slash commands decription to be dynamic Other improvements: - Add permission checks in slash commands definition - Use IssuesFinder and MergeRequestsFinder - Use next if instead of a unless block, and use splat operator instead of flatten Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Add support for no-op slash commands that appear in autocompleteRémy Coutable2016-08-132-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first one is /cc Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Don't extract slash commands inside blockcode, blockquote or HTML tagsRémy Coutable2016-08-131-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve slash command descriptions, support /due tomorrow Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Add the /title slash commandRémy Coutable2016-08-131-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Support slash commands in noteable description and notesRémy Coutable2016-08-133-0/+296
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some important things to note: - commands are removed from noteable.description / note.note - commands are translated to params so that they are treated as normal params in noteable Creation services - the logic is not in the models but in the Creation services, which is the right place for advanced logic that has nothing to do with what models should be responsible of! - UI/JS needs to be updated to handle notes which consist of commands only - the `/merge` command is not handled yet Other improvements: - Don't process commands in commit notes and display a flash is note is only commands - Add autocomplete for slash commands - Add description and params to slash command DSL methods - Ensure replying by email with a commands-only note works - Use :subscription_event instead of calling noteable.subscribe - Support :todo_event in IssuableBaseService Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | Merge remote-tracking branch 'origin/master' into improve-pipeline-processingKamil Trzcinski2016-08-121-0/+30
|\ \ \ \ \
| * | | | | api for generating new merge requestScott Le2016-08-111-0/+30
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Fix test failures, that did occur because of missing previously used ↵Kamil Trzcinski2016-08-111-7/+9
| | | | | | | | | | | | | | | | | | | | `reload_status!` call
* | | | | Use state machine for pipeline event processingKamil Trzcinski2016-08-111-1/+0
|/ / / /
* | | | Merge branch 'refactor-builds-creation-service' into 'master' Rémy Coutable2016-08-113-10/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-113-10/+12
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Fix front-end for branches that happen to contain urlencoding escape ↵10772-fix-urlencoded-branchnameElliot2016-08-111-3/+16
|/ / / | | | | | | | | | | | | | | | characters (e.g. %) Signed-off-by: Rémy Coutable <remy@rymai.me>