summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'fix/github-importer-client' into 'master' Rémy Coutable2016-10-061-2/+12
|\ | | | | | | | | | | | | | | | | | | Fix broken handling of certain calls in GitHub importer client ## What does this MR do? It changes/fixes the behavior of request handling in GH client. Now it returns the response directly if it's not a collection of resources. Otherwise, it checks for a passed block, if true, then it yield each page to said block, if not, it collects all response in a single array then returns it. Closes #22998 See merge request !6703
| * Fix broken handling of certain calls in GitHub importer clientfix/github-importer-clientAhmad Sherif2016-10-061-2/+12
| | | | | | | | Closes #22998
* | Merge branch 'rc-use-grape-dsl-to-document-members-api' into 'master' Robert Speicher2016-10-062-93/+67
|\ \ | | | | | | | | | | | | | | | | | | API: Use Grape DSL to document access requests and members endpoints Part of #21979, depends on gitlab-org/gitlab-ce!6267 and gitlab-org/gitlab-ce!6266. See merge request !6269
| * | Use Grape DSL to document methods and their paramsrc-use-grape-dsl-to-document-members-apiRémy Coutable2016-10-052-93/+67
| | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | Merge branch 'mahcsig/gitlab-ce-17350-multi-file-commit'Rémy Coutable2016-10-061-0/+36
|\ \ \ | | | | | | | | | | | | See !6096.
| * | | multi-file commitMarc Siegfriedt2016-10-051-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | add docs and tests - add additional validation allow move without content updated response
* | | | Merge branch 'issue-board-api-support' into 'master' Dmitriy Zaporozhets2016-10-063-1/+133
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue Board API support ## What does this MR do? Adds support for Issue Board in the API. ## Are there points in the code the reviewer needs to double check? ~~Double check whether the Issue Board list movement fix is needed.~~ *Moved to a separate issue.* [#22890](https://gitlab.com/gitlab-org/gitlab-ce/issues/22890) ## Why was this MR needed? Currently the API offers partial support to a project's Issue Board indirectly through Labels. This MR adds support for listing, creating, moving and removing board lists. ## 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 [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 you do - 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? [#22195](https://gitlab.com/gitlab-org/gitlab-ce/issues/22195) See merge request !6646
| * | | | Added Issue Board API supportAndre Guedes2016-10-053-1/+133
| | |_|/ | |/| | | | | | | | | | - Includes documentation and tests
* | | | Use higher size on Gitlab::Redis connection pool on Sidekiq serversPaco Guzman2016-10-061-1/+11
| | | |
* | | | Merge remote-tracking branch 'dev/master'Rémy Coutable2016-10-063-5/+25
|\ \ \ \
| * \ \ \ Merge branch 'fix/id-claim-import-issue' into 'master' Douwe Maan2016-09-303-5/+25
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent claiming associated model IDs via import On the import side, we should be careful not to use any IDs as part of the JSON file that could have been manipulated. Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/20821 Things we already do (__before__ this fix): 1. Remove all primary keys 1. **Always** reassign some of the foreign keys, such as ALL project IDs and user IDs (so it would be difficult to impersonate or try to gain access to another project) 1. Ignore/reject attributes that do not exist in the model 1. If someone reassigns a foreign key `submodel_id`, and that object has another json as the submodel, the new submodel will reassign the `submodel_id` to the newly created submodel ID. Things we should do: 1. Remove/nullify any other foreign keys that we don't reassign (checked this, and there aren't many, fortunately. In fact, I don't think much harm can be done at all - at the moment). See merge request !1985
| | * | | | updated attribute cleaner to use allowed keyword and reject attributesJames Lopez2016-09-271-3/+3
| | | | | |
| | * | | | Prevent claiming associated model IDs via import and added relevant specsJames Lopez2016-09-273-5/+25
| | | | | |
* | | | | | Merge commit 'dev/security' into 'master'Rémy Coutable2016-10-068-8/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | | | | fix export project file permissions issueJames Lopez2016-09-307-7/+18
| | | | | | |
| * | | | | | Merge branch '22435-no-api-state-change-via-rails-session' into 'security' Douwe Maan2016-09-281-1/+4
| |\ \ \ \ \ \ | | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: disable rails session auth for non-GET/HEAD requests Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22435 See merge request !1999
| | * | | | | API: disable rails session auth for non-GET/HEAD requestsNick Thomas2016-09-231-1/+4
| | | | | | |
* | | | | | | Merge branch 'fix_group_links_404' into 'master' Fatih Acet2016-10-051-0/+3
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix group links 404 ### What does this MR do? This MR should fix the 404 page, when creating a new group links without selecting any group from the group dropdown list. ### What are the relevant issue numbers? Closes #20766 See merge request !6155
| * | | | | | fix group links 404barthc2016-10-051-0/+3
| | |_|_|_|/ | |/| | | |
* | | | | | Merge branch 'kradydal/gitlab-ce-20989-disable-all-for-non-project-members'Rémy Coutable2016-10-051-5/+9
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | See !6474.
| * | | | | Fix test, add author attribute to all testsKatarzyna Kobierska2016-10-031-2/+2
| | | | | |
| * | | | | Prevent rendering the link when the author has no accessKatarzyna Kobierska2016-10-031-5/+9
| | | | | |
* | | | | | Merge branch 'test-improve-gitlab-identifier' into 'master' Rémy Coutable2016-10-051-8/+50
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor Gitlab::Identifier ## What does this MR do? This refactors `Gitlab::Identifier` so that it: 1. Has tests 2. Caches output in an instance variable to reduce queries 3. Uses only a single query to find a user by an SSH key, instead of 2 ## Why was this MR needed? This code was untested and would execute more SQL queries than needed. See merge request !6680
| * | | | | | Refactor Gitlab::IdentifierYorick Peterse2016-10-051-8/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactors Gitlab::Identifier so it uses fewer queries and is actually tested. Queries are reduced by caching the output as well as using 1 query (instead of 2) to find a user using an SSH key.
* | | | | | | Merge branch 'update-runner-information' into 'master' Rémy Coutable2016-10-052-16/+19
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update runner version only when updating contacted_at ## What does this MR do? Improves how we update runners table, especially the version. This is another round of improvements to reduce number of `ci_runners` updates. I did make `contacted_at` to be updated more often (on average every 15 minutes). We will also update version information in one go to solve: https://gitlab.com/gitlab-org/gitlab-ce/issues/22206 Improves: https://gitlab.com/gitlab-org/gitlab-ce/issues/22590 Solves: https://gitlab.com/gitlab-org/gitlab-ce/issues/22206 See merge request !6537
| * | | | | | Extract method that checks if ci runner needs updateGrzegorz Bizon2016-10-031-4/+11
| | | | | | |
| * | | | | | Update runner version only when updating contacted_atKamil Trzcinski2016-10-032-14/+10
| | |/ / / / | |/| | | |
* | | | | | Merge branch 'fix/22225' into 'master' Sean McGivern2016-10-042-13/+25
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skip wiki creation when GitHub project has wiki enabled ## What does this MR do? When importing a repository from if the repository has wiki, we should not create the default wiki. Otherwise the GitHub importer will fail because the wiki repository already exist. This bug was introduced here https://gitlab.com/gitlab-org/gitlab-ce/commit/892dea67717c0efbd6a28f7639f34535ec0a8747 ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? GitLab fails to import GitHub Wiki. ## Screenshots (if relevant) ## 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 [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) - [ ] 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) ## What are the relevant issue numbers? Fixes #22225 See merge request !6665
| * | | | | Skip wiki creation when GitHub project has wiki enabledDouglas Barbosa Alexandre2016-10-042-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the GitHub project repository has wiki, we should not create the default wiki. Otherwise the GitHub importer will fail because the wiki repository already exist. This bug was introduced here https://gitlab.com/gitlab-org/gitlab-ce/commit/892dea67717c0efbd6a28f763 9f34535ec0a8747
* | | | | | Removed puts code :see_no_evil:code-blocks-vue-prePhil Hughes2016-10-041-1/+0
| | | | | |
* | | | | | Adds v-pre to code blocks in commentsPhil Hughes2016-10-042-2/+3
|/ / / / / | | | | | | | | | | | | | | | Closes #22911
* | | | | Merge branch 'rc-improve-members-destroy-service' into 'master' Robert Speicher2016-10-042-4/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve `Members::DestroyService` Part of #21979. See merge request !6267
| * | | | | Remove useless code now that Member#add_user handles itrc-improve-members-destroy-serviceRémy Coutable2016-10-031-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | | | Fix a few things after the initial improvment to Members::DestroyServiceRémy Coutable2016-10-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | | | Improve Members::DestroyServiceRémy Coutable2016-10-032-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | GrapeDSL for Namespace endpointzj-grape-sessionsZ.J. van de Weg2016-10-041-12/+10
|/ / / / /
* | | | | Merge branch 'aiionx_sidekiq_log_patch' into 'master' Rémy Coutable2016-10-031-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Log sidekiq arguments as json Logging the sidekiq job arguments as a ruby literal structure is akward. Specially when parsing the logs. JSON is a standar format. See merge request !3735
| * | | | | aiionx_sidekiq_log_patchDavid2016-04-151-1/+1
| | | | | |
* | | | | | Merge branch '22466-task-list-fork' into 'master' Rémy Coutable2016-10-031-22/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Task List Checkbox Alignment" ## What does this MR do? Replace the unmaintained `task_list` gem with the `deckar01-task_list` fork ## Are there points in the code the reviewer needs to double check? - I had to pin some dependencies in the fork to support `ruby < 2.2`, which added new version restrictions for 2 existing modules. - I triggered a build after I removed the patch to show the test passed with the new gem, then I removed the test, because this behavior is tested in the gem's repo now. ## Why was this MR needed? - The `task_list` patch was added with a comment that said it should be removed when merged upstream, but the repo got archived, so an upstream patch requires a fork. - #22470 can't be patched without warnings due to the way `task_list` uses Ruby constants. - There are additional outstanding `task_list` bugs that can be fixed once we switch to a fork. ## What are the relevant issue numbers? - #22466 - #22470 - !6487 See merge request !6625
| * | | | | | Replace talk_list patch with a patched forkJared Deckard2016-09-301-22/+0
| | | | | | |
* | | | | | | Merge branch 'zj-grape-award-emoji' into 'master' Robert Speicher2016-10-031-33/+31
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrapeDSL for Award Emoji endpoints Cherry-picked from !6330 See merge request !6629
| * | | | | | | GrapeDSL for Award Emoji endpointszj-grape-award-emojiZ.J. van de Weg2016-10-031-33/+31
| | |_|/ / / / | |/| | | | |
* | | | | | | Merge branch 'zj-grape-keys' into 'master' Rémy Coutable2016-10-031-4/+3
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GrapeDSL for Keys endpoint No changelog item as it doesn't change behaviour Cherry-picket from !6330 See merge request !6631
| * | | | | | GrapeDSL for Keys endpointzj-grape-keysZ.J. van de Weg2016-10-011-4/+3
| |/ / / / /
* | | | | | Merge branch ↵Robert Speicher2016-10-022-15/+6
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '21983-member-add_user-doesn-t-detect-existing-members-that-have-requested-access' into 'master' Resolve "`Member.add_user`doesn't detect existing members that have requested access" ## What does this MR do? This merge request handle the case when an access requester is added to a group or project (via the members page or the API). In `Member.add_user`, if an access requester already exists, we simply accept their request (and set the `created_by`, `access_level` and `expires_at` attributes if given). ## Are there points in the code the reviewer needs to double check? I've taken the opportunity to cleanup the whole `{Group,Project}Member.add_user*` methods since it was quite a mess. ## What are the relevant issue numbers? Closes #21983 See merge request !6393
| * | | | | Allow Member.add_user to handle access requestersRémy Coutable2016-09-282-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes include: - Ensure Member.add_user is not called directly when not necessary - New GroupMember.add_users_to_group to have the same abstraction level as for Project - Refactor Member.add_user to take a source instead of an array of members - Fix Rubocop offenses - Always use Project#add_user instead of project.team.add_user - Factorize users addition as members in Member.add_users_to_source - Make access_level a keyword argument in GroupMember.add_users_to_group and ProjectMember.add_users_to_projects - Destroy any requester before adding them as a member - Improve the way we handle access requesters in Member.add_user Instead of removing the requester and creating a new member, we now simply accepts their access request. This way, they will receive a "access request granted" email. - Fix error that was previously silently ignored - Stop raising when access level is invalid in Member, let Rails validation do their work Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | Merge branch '21744-fix-missing-values-in-linter' into 'master' Rémy Coutable2016-09-301-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing values to linter (`only`, `except`) and add new one `Environment` Closes #21744 See merge request !6276
| * | | | | | Expose jobs to viewKatarzyna Kobierska2016-09-301-3/+1
| | | | | | |
| * | | | | | Add missing values to linterKatarzyna Kobierska2016-09-301-0/+2
| | | | | | |
* | | | | | | Merge branch 'initialize-redis' into 'master' Yorick Peterse2016-09-301-18/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize Redis pool in single-threaded context See merge request !6613