summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 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
* 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
| * | | | Improve the performance of the GET /:sources/:id/{access_requests,members} ↵Rémy Coutable2016-08-103-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API endpoints The performance was greatly improved by removing two N+1 queries issues for each endpoint. For comparison: 1. `GET /projects/:id/members` With two N+1 queries issues (one was already fxed in the following snippet): ``` ProjectMember Load (0.2ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS NULL ORDER BY "members"."id" DESC [["source_type", "Project"], ["source_id", 1], ["source_type", "Project"]] User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (5, 22, 16, 13) ORDER BY "users"."id" DESC ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ProjectMember Load (0.3ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS NULL AND "members"."user_id" = $4 ORDER BY "members"."id" DESC LIMIT 1 [["source_type", "Project"], ["source_id", 1], ["source_type", "Project"], ["user_id", 5]] ProjectMember Load (0.3ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS NULL AND "members"."user_id" = $4 ORDER BY "members"."id" DESC LIMIT 1 [["source_type", "Project"], ["source_id", 1], ["source_type", "Project"], ["user_id", 22]] ProjectMember Load (0.3ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS NULL AND "members"."user_id" = $4 ORDER BY "members"."id" DESC LIMIT 1 [["source_type", "Project"], ["source_id", 1], ["source_type", "Project"], ["user_id", 16]] ProjectMember Load (0.3ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS NULL AND "members"."user_id" = $4 ORDER BY "members"."id" DESC LIMIT 1 [["source_type", "Project"], ["source_id", 1], ["source_type", "Project"], ["user_id", 13]] ``` Without the N+1 queries issues: ``` ProjectMember Load (0.3ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND "members"."requested_at" IS NULL ORDER BY "members"."id" DESC LIMIT 20 OFFSET 0 [["source_type", "Project"], ["source_id", 1], ["source_type", "Project"]] User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (5, 22, 16, 13) ORDER BY "users"."id" DESC ``` 2. `GET /projects/:id/access_requests` With two N+1 queries issues: ``` ProjectMember Load (0.3ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND ("members"."requested_at" IS NOT NULL) ORDER BY "members"."id" DESC [["source_type", "Project"], ["source_id", 8], ["source_type", "Project"]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" DESC LIMIT 1 [["id", 24]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" DESC LIMIT 1 [["id", 23]] ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ProjectMember Load (0.1ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND ("members"."requested_at" IS NOT NULL) AND "members"."user_id" = $4 ORDER BY "members"."id" DESC LIMIT 1 [["source_type", "Project"], ["source_id", 8], ["source_type", "Project"], ["user_id", 24]] ProjectMember Load (0.2ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND ("members"."requested_at" IS NOT NULL) AND "members"."user_id" = $4 ORDER BY "members"."id" DESC LIMIT 1 [["source_type", "Project"], ["source_id", 8], ["source_type", "Project"], ["user_id", 23]] ``` Without the N+1 queries issues: ``` ProjectMember Load (0.3ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = $1 AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $2 AND "members"."source_type" = $3 AND "members"."type" IN ('ProjectMember') AND ("members"."requested_at" IS NOT NULL) ORDER BY "members"."id" DESC LIMIT 20 OFFSET 0 [["source_type", "Project"], ["source_id", 8], ["source_type", "Project"]] User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (24, 23) ORDER BY "users"."id" DESC ``` Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | | Restore back-compatibility for current members API endpointsRémy Coutable2016-08-102-8/+38
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | | New AccessRequests API endpoints for Group & ProjectRémy Coutable2016-08-108-229/+253
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, mutualize AccessRequests and Members endpoints for Group & Project. New API documentation for the AccessRequests endpoints. Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | Merge branch 'fix-gitaccess-scope' into 'master' Rémy Coutable2016-08-111-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing scope issue in GitAccess. This MR fixes a scoping issue around the GitAccessStatus.new call - it needs to be scoped to the Gitlab otherwise it can end up being confused with the GitAccessStatus class in gitlab-shell, which has a 3-element constructor. Although not strictly necessary for community GitLab, it is more correct, and fixes an issue we (Perforce) found due to our engine overrides. This change should have any affect on community GitLab. See merge request !5483
| * | | Fixing scope issue in GitAccess.Elliot Wiltshire2016-07-251-1/+1
| | | |
* | | | Merge branch 'clean-up-project-destroy' into 'master' Robert Speicher2016-08-101-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up project destruction Instead of redirecting from the project service to the service and back to the model, put all destruction code in the service. Also removes a possible source of failure where run_after_commit may not destroy the project. See merge request !5695
| * | | | Clean up project destructionclean-up-project-destroyStan Hu2016-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of redirecting from the project service to the service and back to the model, put all destruction code in the service. Also removes a possible source of failure where run_after_commit may not destroy the project.
* | | | | Merge branch 'feature/svg-badge-template' into 'master' Douwe Maan2016-08-103-28/+111
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use badge image template instead of using separate images ## What does this MR do? Makes it possible to use template for badge instead of having multiple files. ## Are there points in the code the reviewer needs to double check? We also have a deprecated badge in `controllers/ci/projects_controller.rb`. We decided to leave it until 9.0, so we still have images in `public/ci/` until 9.0. ## Why was this MR needed? We are going to implement build coverage badge, and we do not want to store 101 SVG images for each percentage value. ## What are the relevant issue numbers? #3714 ## Screenshots (if relevant) ![new_build_badge](/uploads/f1d4ed5e34278eb01f48994b5b0579f1/new_build_badge.png) ## Does this MR meet the acceptance criteria? - [ ] ~~[CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added~~ (refactoring) - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~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) - [ ] ~~[Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)~~ (refactoring) See merge request !5520
| * | | | Merge branch 'master' into feature/svg-badge-templateGrzegorz Bizon2016-08-0914-114/+83
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (52 commits) remove offending empty line Namespace EnableDeployKeyService under Projects Update version_sorter and use new interface for faster tag sorting Avoid to show the original password field when password is automatically seted Support pending invitation project members importing projects Added concern for a faster "cache_key" method Update templates "This file is managed by gitlab-ctl. Manual changes will be erased!" Remove legacy Ci::StaticModel we do not use anymore Revert "Defend against 'Host' header injection" Simplify feature introduction note Add migration-related tips to the "Merge Request Guidelines" doc Enable Style/SpaceAroundEqualsInParameterDefault cop Enable Style/EmptyLinesAroundClassBody cop Enable Style/EmptyLinesAroundModuleBody cop Ensure we are looking for the right dropdown inside the form wrapper Set for for labels and ID for dropdowns on create form Fix .panel-title style Refine selector for form submit button Fix spelling. `braches` to `branches` ...
| * | | | Improve indentation in svg badge templateGrzegorz Bizon2016-08-081-1/+1
| | | | |
| * | | | Improve builds badge specs, remove legacy methodsGrzegorz Bizon2016-08-081-15/+6
| | | | |
| * | | | Merge branch 'master' into feature/svg-badge-templateGrzegorz Bizon2016-08-0876-664/+1516
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (363 commits) Added changelog item for issuable form dropdowns Add 'run tests' docs from GDK Bump gitlab_git to lazy load compare commits Add examples to repository files API (!5465) Ignore URLs starting with // (!5677) Add failing test for #7032 Update timeago to shorter representation Add missing DOWNTIME constant to the AddTimestampsToMembersAgain migration Added guide about migrations and downtime Update CHANGELOG for 8.10.4 Add a data migration to fix some missing timestamps in the members table (again) Move abilities by subject class to a dedicated method Remove unnecessary empty line after css var Set consistency in list text height css Add description to text/plain emails Fix Rename `add_users_into_project` and `projects_ids` fix spec Underscore variable to camelCase using shared path for project import uploads and refactored gitlab remove export worker Structure the development documentation ...
| * | | | | Use new badge template to render build status badgeGrzegorz Bizon2016-08-081-0/+4
| | | | | |
| * | | | | Add badge template class to use with SVG ERB templateGrzegorz Bizon2016-07-281-0/+63
| | | | | |
| * | | | | Calculate build status only in build badge classGrzegorz Bizon2016-07-281-7/+13
| | | | | |
| * | | | | Extract build status badge metadata to separate classGrzegorz Bizon2016-07-282-21/+40
| | | | | |
* | | | | | Merge branch 'rs-rename-run-helper' into 'master' Douwe Maan2016-08-104-17/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename `run` task helper method to prevent conflict with StateMachine This prevents the following message from appearing whenever running a Rake task: Instance method "run" is already defined in Object, use generic helper instead or set StateMachines::Machine.ignore_method_conflicts = true. See merge request !5750
| * | | | | | Rename `run` task helper method to prevent conflict with StateMachineRobert Speicher2016-08-094-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents the following message from appearing whenever running a Rake task: Instance method "run" is already defined in Object, use generic helper instead or set StateMachines::Machine.ignore_method_conflicts = true.
* | | | | | | Merge branch 'gh-pull-requests' into 'master' Douwe Maan2016-08-094-87/+39
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check out GH pull requests locally where the source/target branch had been deleted ## What does this MR do? Check out GitHub pull requests where source/target branches that had been deleted locally rather than temporarily restoring them on GitHub using their References API. This helps us to not get rate limited, and allow us to import cross-repository pull requests (those from forks). ## What are the relevant issue numbers? Fixes #15528 Fixes #17766 Fixes #19310 Fixes #19439 Fixes #19998 Fixes #20153 Fixes #20552 Fixes https://gitlab.com/gitlab-com/support-forum/issues/801 #20385 ## Screenshots (if relevant) ## 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 !5630
| * | | | | | | Prefixes removed branches name with PR number when importing PR from GHgh-pull-requestsDouglas Barbosa Alexandre2016-08-082-6/+14
| | | | | | | |
| * | | | | | | Remove SHA suffix for removed branches name when importing PR from GHDouglas Barbosa Alexandre2016-08-082-29/+27
| | | | | | | |
| * | | | | | | Allow users to import cross-repository pull requests from GitHubDouglas Barbosa Alexandre2016-08-041-5/+1
| | | | | | | |
| * | | | | | | Does not need to disable GitHub webhooks since PRs are check out locallyDouglas Barbosa Alexandre2016-08-042-54/+0
| | | | | | | |
| * | | | | | | Check out locally PRs where the source/target branch were removedDouglas Barbosa Alexandre2016-08-041-7/+11
| | | | | | | |
* | | | | | | | Merge branch 'brodock/gitlab-ce-feature/redis-sentinel'Douwe Maan2016-08-092-25/+116
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # lib/gitlab/redis.rb
| * | | | | | | Small refactor in Redis class and improved specsGabriel Mazetto2016-08-061-1/+5
| | | | | | | |
| * | | | | | | Small refactor and a few documentation fixesGabriel Mazetto2016-08-042-3/+3
| | | | | | | |
| * | | | | | | Few minor fixes to Redis params order and commented out sentinel configGabriel Mazetto2016-08-042-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in resque.yml.example Codestyle changes
| * | | | | | | Fixed MailRoom specs and make sure it works with new resque.yml formatGabriel Mazetto2016-08-042-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some codestyle changes
| * | | | | | | Fixed specs for Gitlab::Redis and code for Redis Sentinel supportGabriel Mazetto2016-08-042-9/+10
| | | | | | | |
| * | | | | | | Specs for RedisConfigGabriel Mazetto2016-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure :url is not present on RedisConfig.params after parsing
| * | | | | | | Deduplicated resque.yml loading from several placesGabriel Mazetto2016-08-042-25/+103
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | We will trust redis configuration params loading to Gitlab::RedisConfig.
* | | | | | | Merge branch 'relative-link-filter-ref' into 'master' Robert Speicher2016-08-091-3/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not look up commit again when it is passed to RelativeLinkFilter ## What does this MR do? Use `context[:commit]` in RelativeLinkFilter instead of looking up commit using `context[:ref]`. ## Why was this MR needed? Even though the commit object was already passed, unnecessary I/O is done to retrieve the commit object. ## What are the relevant issue numbers? Fixes #20026 See merge request !5455
| * | | | | | | Do not look up commit again when it is passed to RelativeLinkFilter (!5455)winniehell2016-08-021-3/+3
| | | | | | | |
* | | | | | | | Merge branch 'fix/import-mr-source' into 'master' Robert Speicher2016-08-091-6/+8
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix importing with an invalid MR source project Source project shouldn't be -1 when both source and target are the same in the original export. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/20611 See merge request !5679
| * | | | | | | | fix MR source project assignmentfix/import-mr-sourceJames Lopez2016-08-091-6/+8
| | |_|_|_|/ / / | |/| | | | | |
* | | | | | | | Merge branch 'avoid-constant-warnings-in-rails' into 'master' Robert Speicher2016-08-092-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails prefers require_dependency so that it won't require twice: ## What does this MR do? Fix warnings for loading constants twice ## Are there points in the code the reviewer needs to double check? Now it's depending on `require_dependency`. ## Why was this MR needed? Fixes #20724 Backtrace before this patch: $23876 See merge request !5727