summaryrefslogtreecommitdiff
path: root/spec/requests/api
Commit message (Collapse)AuthorAgeFilesLines
* Don't allow blank MR titles in APIapi-dont-allow-blank-mr-titlesRobert Schilling2016-12-131-0/+16
|
* Merge branch 'features/api-snippets' into 'master' Sean McGivern2016-12-121-0/+157
|\ | | | | | | | | | | | | Adding support for personal snippet endpoint on the API Closes #22042 See merge request !6373
| * API: Endpoint to expose personal snippets as /snippetsGuyzmo2016-12-011-0/+157
| | | | | | | | | | | | | | | | | | | | Adding the necessary API for the new /snippets Restful resource added with this commit. Added a new Grape class `Snippets`, as well as a `PersonalSnippet` entity. Issue: #20042 Merge-Request: !6373 Signed-off-by: Guyzmo <guyzmo+gitlab+pub@m0g.net>
* | Merge branch 'api-remove-source-branch' into 'master' Rémy Coutable2016-12-091-1/+11
|\ \ | | | | | | | | | | | | | | | | | | API: Ability to remove source branch Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23577 See merge request !7804
| * | API: Ability to remove source branchapi-remove-source-branchRobert Schilling2016-12-041-1/+11
| | |
* | | Merge branch 'public-tags-api' into 'master' 19703-direct-link-pipelines-into-buildsDouwe Maan2016-12-081-7/+48
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Allow public access to some Tag API endpoints Continuation of #4269. See merge request !7896
| * | | Allow public access to some Tag API endpointspublic-tags-apiRémy Coutable2016-12-071-7/+48
| | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Merge branch '24537-reenable-private-token-with-sudo' into 'master' Douwe Maan2016-12-082-82/+196
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reenables /user API request to return private-token if user is admin and requested with sudo ## What does this MR do? Reenables the API /users to return `private-token` when sudo is either a parameter or passed as a header and the user is admin. ## Screenshots (if relevant) Without **sudo**: ![Screen_Shot_2016-11-21_at_11.44.49](/uploads/ebecf95dbadaf4a159b80c61c75771d9/Screen_Shot_2016-11-21_at_11.44.49.png) With **sudo**: ![Screen_Shot_2016-11-21_at_11.45.52](/uploads/f25f9ddffcf2b921e9694e5a250191d3/Screen_Shot_2016-11-21_at_11.45.52.png) ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) 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 [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [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 it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #24537 See merge request !7615
| * | | | adds impersonator variable and makes sudo usage overall more clear24537-reenable-private-token-with-sudotiagonbotelho2016-12-072-82/+196
| | | | |
* | | | | Merge branch 'grapify-issues-api' into 'master' Rémy Coutable2016-12-071-12/+14
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Grapify the issues API Related to #22928 See merge request !7968
| * | | | Grapify the issues APIgrapify-issues-apiRobert Schilling2016-12-071-12/+14
| | | | |
* | | | | Merge branch '25209-improve-length-validators' into 'master' Rémy Coutable2016-12-071-3/+1
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Use :maximum instead of :within for length validators with a 0..N range Closes #25209 See merge request !7894
| * | | | Use :maximum instead of :within for length validators with a 0..N range25209-improve-length-validatorsRémy Coutable2016-12-061-3/+1
| |/ / / | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Merge branch '23589-open-issue-for-mr' into 'master' Sean McGivern2016-12-061-0/+26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Create an issue for all unresolved discussions in an MR See merge request !7180
| * | | | Feature: delegate all open discussions to IssueBob Van Landuyt2016-12-051-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a merge request can only be merged when all discussions are resolved. This feature allows to easily delegate those discussions to a new issue, while marking them as resolved in the merge request. The user is presented with a new issue, prepared with mentions of all unresolved discussions, including the first unresolved note of the discussion, time and link to the note. When the issue is created, the discussions in the merge request will get a system note directing the user to the newly created issue.
* | | | | Merge branch 'zj-guest-reads-public-builds' into 'master' Sean McGivern2016-12-061-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Guests can read builds if those are public See merge request !6842
| * | | | Guests can read builds if those are publicZ.J. van de Weg2016-12-041-1/+1
| | |/ / | |/| | | | | | | | | | Fixes #18448
* | | | Merge branch 'fix/rename-mwbs-to-merge-when-pipeline-succeeds' into 'master' Kamil Trzciński2016-12-051-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename MWBS service to Merge When Pipeline Succeeds ## What does this MR do? This MR renames Merge When Build Succeeds feature to Merge When Pipeline Succeeds, because we recently changed the behavior, see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6675. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] All builds are passing ## What are the relevant issue numbers? Closes #23354 See merge request !7135
| * | | Fix Rubocop offense in merge request specsfix/rename-mwbs-to-merge-when-pipeline-succeedsGrzegorz Bizon2016-11-301-1/+0
| | | |
| * | | Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeedsGrzegorz Bizon2016-11-304-18/+58
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (110 commits) Rewrite an HTTP link to use HTTPS Edit /spec/features/profiles/preferences_spec.rb to match changes in 084d90ac Add blue back to sub nav active Remove JSX/React eslint plugins. Fix a transient spec failure Adds hoverstates for collapsed Issue/Merge Request sidebar Moved groups above projects Add StackProf to the Gemfile, along with a utility to get a profile for a spec Update Sidekiq-cron to fix compatibility issues with Sidekiq 4.2.1 Add a CHANGELOG entry Alert user when logged in user email is not the same as the invitation Expose timestamp in build entity used by serializer Rename `MergeRequest#pipeline` to `head_pipeline` Remove unnecessary database indexes CE-specific changes gitlab-org/gitlab-ee#1137 Fixing typo & Clarifying Key name fix started_at check fix blob controller spec failure - updated not to use file-path- fix blob controller spec failure Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' ... Conflicts: app/controllers/projects/merge_requests_controller.rb lib/api/merge_requests.rb spec/requests/api/merge_requests_spec.rb
| * \ \ \ Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeedsGrzegorz Bizon2016-11-258-45/+199
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (312 commits) Fix bad selection on dropdown menu for tags filter Fixed issue boards scrolling with a lot of lists & issues You can only assign default_branch when editing a project ... Don't convert data which already is the target type Stop supporting Google and Azure as backup strategies renames some of the specs and adds changelog entry Fixed dragging issue moving wrong issue after multiple drags of issue Fixed issue boards issue sorting when dragging issue into list Rephrase some system notes to be compatible with new system note style Add missing JIRA file that redirects to the new location Fix documentation to create the `pg_trm` extension before creating the DB Document that we always use `do...end` for `before` in RSpec Backport Note#commands_changes from EE Log mv_namespace parameters Add default_branch attr to Project API payload in docs. Fix title case to sentence case properly escape username validation error message flash Remove header ids from University docs Add missing documentation. Added test that checks the correct select box is there for the LFS ... ... Conflicts: app/services/system_note_service.rb spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb spec/services/system_note_service_spec.rb
| * | | | | Update some docs to reflect MWPS name changeGrzegorz Bizon2016-11-211-1/+1
| | | | | |
* | | | | | Merge branch 'api-expose-commiter-details' into 'master' Rémy Coutable2016-12-041-2/+7
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Expose committer details for a commit Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22312 See merge request !7849
| * | | | | API: Expose committer details for a commitapi-expose-commiter-detailsRobert Schilling2016-12-011-2/+7
| | | | | |
* | | | | | Merge branch 'update-api-spec-files' into 'master' Rémy Coutable2016-12-0234-36/+35
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update API spec files to describe the correct class by changing `API::API` to the corresponding class, for example `API::AwardEmoji`. Closes #24902 See merge request !7718
| * | | | | | Changed API spec files to describe the correct classLivier2016-11-2834-36/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore changes for api spec files Fix error in rspec Users Delete extra space Repositories-spec
* | | | | | | Allow public access to some Project API endpoints4269-public-apiRémy Coutable2016-12-012-142/+288
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Only include EmailHelpers in mailer specs and specs using themrs-include-emailhelpersRobert Speicher2016-12-011-0/+1
| |/ / / / |/| | | |
* | | | | Merge branch 'api-branch-status' into 'master' Rémy Coutable2016-11-301-0/+11
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Expose branch status Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24938 See merge request !7796
| * | | | | API: Expose branch statusapi-branch-statusRobert Schilling2016-11-301-0/+11
| | | | | |
* | | | | | Merge branch 'grapify-projects-api' into 'master' Rémy Coutable2016-11-301-21/+20
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grapify the projects API Related to #22928 See merge request !7456
| * | | | | Grapify the projects APIgrapify-projects-apiRobert Schilling2016-11-281-21/+20
| |/ / / /
* | | | | Rename `MergeRequest#pipeline` to `head_pipeline`fix/rename-merge-request-head-pipelineGrzegorz Bizon2016-11-291-1/+1
| | | | |
* | | | | Merge branch 'zj-issue-search-slash-command' into 'master' Kamil Trzciński2016-11-291-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add issue search slash command See merge request !7752
| * | | | | Add issue search slash commandzj-issue-search-slash-commandZ.J. van de Weg2016-11-251-1/+1
| | |_|_|/ | |/| | | | | | | | | | | | | One of many requested in: gitlab-org/gitlab-ce#24768
* | | | | Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' Douwe Maan2016-11-281-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace issue access checks with use of IssuableFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 ## Which fixes are in this MR? :warning: - Potentially untested :bomb: - No test coverage :traffic_light: - Test coverage of some sort exists (a test failed when error raised) :vertical_traffic_light: - Test coverage of return value (a test failed when nil used) :white_check_mark: - Permissions check tested ### Issue lookup with access check Using `visible_to_user` likely makes these security issues too. See [Code smells](#code-smells). - [x] :vertical_traffic_light: app/finders/notes_finder.rb:15 [`visible_to_user`] - [x] :traffic_light: app/views/layouts/nav/_project.html.haml:73 [`visible_to_user`] [`.count`] - [x] :white_check_mark: app/services/merge_requests/build_service.rb:84 [`issue.try(:confidential?)`] - [x] :white_check_mark: lib/api/issues.rb:112 [`visible_to_user`] - CHANGELOG: Prevented API returning issues set to 'Only team members' to everyone - [x] :white_check_mark: lib/api/helpers.rb:126 [`can?(current_user, :read_issue, issue)`] Maybe here too? - [x] :white_check_mark: lib/gitlab/search_results.rb:53 [`visible_to_user`] ### Previous discussions - [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b2ff264eddf9819d7693c14ae213d941494fe2b3_128_126 - [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#7b6375270d22f880bdcb085e47b519b426a5c6c7_87_87 See merge request !2031
* | | | | Merge branch 'zj-fix-label-creation-non-members' into 'security'Douwe Maan2016-11-282-16/+25
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix label creation non members Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23416 See merge request !2006
* | | | Merge branch 'zj-expose-coverage-pipelines' into 'master' Rémy Coutable2016-11-251-0/+12
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Expose coverage on GET pipelines/:id Closes gitlab-org/gitlab-ce#24801 See merge request !7670
| * | | Expose coverage on GET pipelines/:idzj-expose-coverage-pipelinesZ.J. van de Weg2016-11-251-0/+12
| | | | | | | | | | | | | | | | | | | | The coverage wasn't exposed yet, now it is but only for detailed requests to save queries on the database.
* | | | Merge branch 'rephrase-system-notes' into 'master' Robert Speicher2016-11-251-1/+1
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | Rephrase some system notes to be compatible with new system note style See merge request !7692
| * | | Rephrase some system notes to be compatible with new system note stylerephrase-system-notesDouwe Maan2016-11-241-1/+1
| | | |
* | | | Merge branch 'api-delete-group-share' into 'master' Rémy Coutable2016-11-231-0/+30
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Add endpoint to delete a group share Closes #24771 See merge request !7662
| * | | | API: Add endpoint to delete a group shareapi-delete-group-shareRobert Schilling2016-11-231-0/+30
| | |/ / | |/| |
* | | | Add a starting date to milestonesmilestone_start_dateValery Sizov2016-11-231-2/+3
| |/ / |/| |
* | | Fix IID filter for merge requests and milestonesRobert Schilling2016-11-222-0/+19
|/ /
* | Merge branch 'grapify-project-snippet-api' into 'master' Rémy Coutable2016-11-211-14/+50
|\ \ | | | | | | | | | | | | | | | | | | Grapify the projects snippet API Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/22928 See merge request !7621
| * | Grapify the projects snippet APIgrapify-project-snippet-apiRobert Schilling2016-11-211-14/+50
| | |
* | | Merge branch 'smarter-cache-invalidation' into 'master' Sean McGivern2016-11-211-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Smarter cache invalidation Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23550 See merge request !7360
| * | Refactor cache refreshing/expiringYorick Peterse2016-11-211-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactors repository caching so it's possible to selectively refresh certain caches, instead of just expiring and refreshing everything. To allow this the various methods that were cached (e.g. "tag_count" and "readme") use a similar pattern that makes expiring and refreshing their data much easier. In this new setup caches are refreshed as follows: 1. After a commit (but before running ProjectCacheWorker) we expire some basic caches such as the commit count and repository size. 2. ProjectCacheWorker will recalculate the commit count, repository size, then refresh a specific set of caches based on the list of files changed in a push payload. This requires a bunch of changes to the various methods that may be cached. For one, data should not be cached if a branch used or the entire repository does not exist. To prevent all these methods from handling this manually this is taken care of in Repository#cache_method_output. Some methods still manually check for the existence of a repository but this result is also cached. With selective flushing implemented ProjectCacheWorker no longer uses an exclusive lease for all of its work. Instead this worker only uses a lease to limit the number of times the repository size is updated as this is a fairly expensive operation.
* | Merge branch 'grapify-users-api' into 'master' Rémy Coutable2016-11-211-27/+49
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grapify the users API Certain endpoints return different entities based on which user issues the request. Right now, I am not aware how to specify multiple entities as part of the description block of the endpoint. @rymai Do you know something about that. ## What are the relevant issue numbers? Related to #22928 See merge request !7147