summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Add single merge request diff API endpointDmitriy Zaporozhets2016-08-121-0/+17
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add MergeRequest#branch_merge_base_commit methodDmitriy Zaporozhets2016-08-081-0/+17
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add API to list merge request diff versionsDmitriy Zaporozhets2016-08-031-0/+32
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix merge request spec for update diff noteDmitriy Zaporozhets2016-08-021-0/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Chnage the way how merge request diff is initialized and savedDmitriy Zaporozhets2016-08-022-15/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Change merge request diff creation from callback to part of the serviceDmitriy Zaporozhets2016-08-022-1/+8
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add more tests to merge_request_diff and improve initializeDmitriy Zaporozhets2016-08-021-0/+17
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Refactor MergeRequestDiff initialize methodDmitriy Zaporozhets2016-08-021-1/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Reload merge request association reload when update codeDmitriy Zaporozhets2016-08-021-3/+2
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Add feature test for merge request versionDmitriy Zaporozhets2016-08-021-0/+38
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Improve merge request diff creation and update testsDmitriy Zaporozhets2016-08-021-12/+16
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'handle-disabled-request-store' into 'master' Yorick Peterse2016-08-021-40/+61
|\ | | | | | | | | Only use RequestStore in ProjectTeam#max_member_access_for_users if it is active See merge request !5604
| * Only use RequestStore in ProjectTeam#max_member_access_for_user if it is activeStan Hu2016-08-011-40/+61
| |
* | Add failing tests for #19028winniehell2016-08-021-0/+12
| |
* | Merge branch 'oldrev-in-update-hooks' into 'master' Douwe Maan2016-08-011-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | webhooks: include old revision in MR update events ## What does this MR do? Includes the old revision for an MR in webhooks. ## Are there points in the code the reviewer needs to double check? The docs do not give an example `update` hook; should I add one? ## Why was this MR needed? In order to keep web hook listeners stateless, it helps to include the previous revision of the MR in the hook so that it does not need to remember the last revision (which may also be wrong in case of missed or out-of-order events due to previous errors). ## What are the relevant issue numbers? N/A ## Screenshots (if relevant) N/A ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [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 !5535
| * | webhooks: include old revision in MR update eventsBen Boeckel2016-08-011-3/+3
| | |
* | | Fix search results for notes without commitsFelipe Artur2016-08-011-0/+20
|/ /
* | Merge branch 'fix-gh-pull-requests' into 'master' Rémy Coutable2016-08-011-3/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix attr reader to force the intended values for source and target shas ## What does this MR do? When importing a pull request from GitHub, the old and new branches may no longer actually exist by those names, but we need to recreate the merge request diff with the right source and target shas. We use these `target_branch_sha` and `source_branch_sha` attributes to force these to the intended values. But the reader methods were always looking up to the target/source branch head instead of check if these values was previously set, this MR applies a memoization pattern to both of them. ## Are there points in the code the reviewer needs to double check? This [commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/6ce25e7b4caa9e94de74378729178c7060d640b2) introduced this bug in the importer. ## What are the relevant issue numbers? gitlab-org/gitlab-ce#20385 ## 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) - [ ] 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) /cc @akitaonrails @DouweM See merge request !5573
| * | Fix attr reader to force the intended values for source and target shasDouglas Barbosa Alexandre2016-07-311-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When importing a pull request from GitHub, the old and new branches may no longer actually exist by those names, but we need to recreate the merge request diff with the right source and target shas. We use these `target_branch_sha` and `source_branch_sha` attributes to force these to the intended values. But the reader methods were always looking up to the target/source branch head instead of check if these values was previously set.
* | | Merge branch 'fix-extra-new-line-crlf' into 'master' Rémy Coutable2016-08-013-2/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trim extra displayed carriage returns in diffs and files with CRLFs ## What does this MR do? This MR strips out extra carriage returns at the end of each tokenized string. ## Are there points in the code the reviewer needs to double check? Does this remove more than we need? ## Why was this MR needed? Windows users would see extra lines in their files. Newline characters are already added with every line in the HTML formatter. ## What are the relevant issue numbers? #20440, gitlab-com/support-forum#892, #20468 ## 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 !5588
| * | | Fix specsfix-extra-new-line-crlfRémy Coutable2016-08-012-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | Trim extra displayed carriage returns in diffs and files with CRLFsStan Hu2016-08-012-1/+14
| | | | | | | | | | | | | | | | Closes #20440
* | | | Merge branch '15064_issuable_default_sort_order' into 'master' Rémy Coutable2016-08-015-35/+216
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sensible state specific default sort order for issues and merge requests ## What does this MR do? It provides more sensible default sort order for issues and merge requests based on the following table: | type | state | default sort order | |----------------|--------|--------------------| | issues | open | last created | | issues | closed | last updated | | issues | all | last created | | merge requests | open | last created | | merge requests | merged | last updated | | merge requests | closed | last updated | | merge requests | all | last created | ## Are there points in the code the reviewer needs to double check? All the bits where `id_desc` was changed to `created_desc`. I hope it's okay, It makes more sense in my opinion. ## Why was this MR needed? Prior to this MR the issues and merge request were sorted based on `id_desc` by default. This MR aims to make the interface more user-friendly by providing state specific sorting defaults most users would expect. ## What are the relevant issue numbers? See #15064 See merge request !5453
| * | | State specific default sort order for issuableszs2016-08-015-35/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide more sensible default sort order for issues and merge requests based on the following table: | type | state | default sort order | |----------------|--------|--------------------| | issues | open | last created | | issues | closed | last updated | | issues | all | last created | | merge requests | open | last created | | merge requests | merged | last updated | | merge requests | closed | last updated | | merge requests | all | last created |
* | | | Merge branch 'fix/labels-milestones-import' into 'master' Rémy Coutable2016-08-013-141/+77
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Importing labels and milestones associations - Import/Export Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19510 and https://gitlab.com/gitlab-org/gitlab-ce/issues/19447 - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry 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 !5426
| * | | | squashed - fixed label and milestone association problems, updated specs and ↵fix/labels-milestones-importJames Lopez2016-08-013-141/+77
| | |_|/ | |/| | | | | | | | | | refactored reader class a bit
* | | | Merge branch 'zj-env-external-url' into 'master' Rémy Coutable2016-08-015-2/+209
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an URL field to Enviroments ## What does this MR do? Adds a field to the `enviroments` table to expose later in other features. Now I see the task list below, I noticed I forgot some minor things, but Ill adress those after the first review. ## Are there points in the code the reviewer needs to double check? The field is a string on the database, thus limited to 255 chars, which seems more than enough. ## What are the relevant issue numbers? Closes #19527 ## Screenshots (if relevant) ![Screen_Shot_2016-07-25_at_15.22.16](/uploads/5c3f39466f8e2114195270006aed20c0/Screen_Shot_2016-07-25_at_15.22.16.png)![Screen_Shot_2016-07-25_at_15.22.53](/uploads/408cf86610137dd4a861d15dcd677a2c/Screen_Shot_2016-07-25_at_15.22.53.png)![Screen_Shot_2016-07-25_at_15.23.10](/uploads/927c506931f4e0338cdbbc58678bd308/Screen_Shot_2016-07-25_at_15.23.10.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [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] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5469
| * | | Minor fixes in the Env API endpointszj-env-external-urlZ.J. van de Weg2016-08-011-2/+18
| | | |
| * | | Use Grape DSL for environment endpointsZ.J. van de Weg2016-07-292-23/+35
| | | | | | | | | | | | | | | | Also a couple of minor edits for this branch are included
| * | | Incorporate feedbackZ.J. van de Weg2016-07-293-16/+31
| | | |
| * | | Add API support for environmentsZ.J. van de Weg2016-07-291-0/+103
| | | |
| * | | Add an URL field to EnvironmentsZ.J. van de Weg2016-07-294-2/+63
| |/ / | | | | | | | | | | | | This MR adds a string (thus max 255 chars) field to the enviroments table to expose it later in other features.
* | | Ignore invalid IPs in X-Forwarded-For when trusted proxies are configured.lookatmike2016-07-311-0/+6
| |/ |/|
* | Merge branch 'reject-merge-conflicts' into 'master' Robert Speicher2016-07-301-0/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly abort a merge when merge conflicts occur If somehow a user attempted to accept a merge request that had conflicts (e.g. the "Accept Merge Request" button or the MR itself was not updated), `MergeService` did not properly detect that a conflict occurred. It would assume that the MR went through without any issues and close the MR as though everything was fine. This could cause data loss if the source branch were removed. Closes #20425 See merge request !5569
| * | Properly abort a merge when merge conflicts occurreject-merge-conflictsStan Hu2016-07-291-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If somehow a user attempted to accept a merge request that had conflicts (e.g. the "Accept Merge Request" button or the MR itself was not updated), `MergeService` did not properly detect that a conflict occurred. It would assume that the MR went through without any issues and close the MR as though everything was fine. This could cause data loss if the source branch were removed. Closes #20425
* | | Improve diff performance by eliminating redundant checks for text blobsremove-redundant-blob-text-callsStan Hu2016-07-291-0/+18
|/ / | | | | | | | | | | | | On a merge request with over 1000 changed files, there were redundant calls to blob_text_viewable?, which incurred about 7% of the time. Improves #14775
* | Merge branch 'fix/import-project-hooks' into 'master' Douwe Maan2016-07-291-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix repo hooks missing on import Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19556 Repo hooks are missing from imported projects - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry 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 !5549
| * | fix repo hooks missing on importfix/import-project-hooksJames Lopez2016-07-281-1/+2
| | | | | | | | | | | | fix spec and added changelog
* | | Merge branch 'ability-batch-issue-checking' into 'master' Robert Speicher2016-07-294-7/+312
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimize checking if a user can read multiple issues ## What does this MR do? This optimizes various parts of the code so it can more efficiently check if a user can read a list of issues. ## Are there points in the code the reviewer needs to double check? Yes, in particular `Ability.issues_readable_by_user` should be checked to make sure it correctly allows/restricts access to issues. ## Why was this MR needed? Currently the general approach to checking if one can read an issue is to iterate over the issues to check and call `can?(user, :read_issue, issue)` for every issue. This is not efficient as the same work has to be done for every issue. ## What are the relevant issue numbers? * #15607 * #17463 See merge request !5370
| * | | Method for returning issues readable by a userability-batch-issue-checkingYorick Peterse2016-07-294-7/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method Ability.issues_readable_by_user takes a list of users and an optional user and returns an Array of issues readable by said user. This method in turn is used by Banzai::ReferenceParser::IssueParser#nodes_visible_to_user so this method no longer needs to get all the available abilities just to check if a user has the "read_issue" ability. To test this I benchmarked an issue with 222 comments on my development environment. Using these changes the time spent in nodes_visible_to_user was reduced from around 120 ms to around 40 ms.
* | | | Merge branch 'refactor/ci-config-move-job-entries' into 'master' Rémy Coutable2016-07-2913-83/+623
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move CI job config entries from legacy to new config ## What does this MR do? This MR extracts jobs configuration logic from legacy CI config processor to the new code. ## What are the relevant issue numbers? #15060 ## Does this MR meet the acceptance criteria? - 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) See merge request !5087
| * | | | Improve code, remove unused validator, improve namesGrzegorz Bizon2016-07-292-3/+3
| | | | |
| * | | | Merge branch 'master' into refactor/ci-config-move-job-entriesGrzegorz Bizon2016-07-2244-1103/+1449
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (183 commits) Add a spec for #20079. Skip repository storage path valitaions on test environment Use Pathname to make the repository storage path validations more robust Update to gitlab_git 10.4.1 and take advantage of preserved Ref objects Change nav link snippet controller Reduce min width of pipeline table Retrieve rendered HTML from cache in one request Explain CI_PROJECT_NAMESPACE better Bump vmstat version to fix issues reporting on FreeBSD Fix sha icon positioning on safari Don't drop in DropAndReaddHasExternalWikiInProjects Mobile view for commit status Fix ci icons getting cut off Update CHANGELOG Extract helper methods to clean up RepositoryArchiveCleanUpService spec Use Dir.mktmpdir instead of FileUtils.mkdir_p in the spec Fix firefox rendering of SVGs Fix icons on commits page and builds page Add new fork SVG to fix weird styling of other SVGs Bug fixes ...
| * | | | | Move job dependencies entry to the new CI configGrzegorz Bizon2016-07-201-1/+1
| | | | | |
| * | | | | Add minor readability, style improvements in CI configGrzegorz Bizon2016-07-201-1/+1
| | | | | |
| * | | | | Merge branch 'master' into refactor/ci-config-move-job-entriesGrzegorz Bizon2016-07-2052-1086/+2299
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (321 commits) Fix the Sentry spam from CSP violations by disabling it. Limit git rev-list output count to one in forced push check Ensure Owners are included in the scope for authorized_projects Fix alignment of icons on project page Fix ci_status_helper_spec to look for new SVGs use 2.0.5, actually (2.0.4 was a bad release) upgrade rouge to 2.0.4 Fix help page paths to make sure shortcuts and the UI help page work. fixes an issue cause by a bad merge Vertically align status icon within table Add new icons for every CI status Add global style for running icon Align running icon in merge request Add new running icon; add a bunch of styles to get svg to match existing fa icons Improve code design Fix broken builds_for_ref Move when tests before to make it no conflict with manual-actions Use value of `yaml_variables` and `when` from config_processor if undefined Add CHANGELOG entry CHANGELOG item ... Conflicts: lib/ci/gitlab_ci_yaml_processor.rb spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
| * | | | | | Move job environment validation to new CI configGrzegorz Bizon2016-07-191-3/+3
| | | | | | |
| * | | | | | Move tags and allow_failure CI entries to new configGrzegorz Bizon2016-07-181-2/+2
| | | | | | |
| * | | | | | Validate allowed keys only in new CI configGrzegorz Bizon2016-07-181-0/+10
| | | | | | |
| * | | | | | Improve valid keys validation for CI config nodesGrzegorz Bizon2016-07-181-5/+16
| | | | | | |