Commit Graph

157 Commits

Author SHA1 Message Date
Sean McGivern 143d88d5e6 Merge branch 'fix/admin-integrations' into 'master'
Fix new admin integrations not taking effect on existing project

Closes #26376

See merge request !11069
2017-05-05 22:01:43 +00:00
James Lopez 856a511b48 refactor code based on feedback 2017-05-05 18:57:52 +02:00
James Lopez 6ecf16b8f7 refactor code based on feedback 2017-05-05 18:01:33 +02:00
James Lopez ce418036c7 add callbacks in bulk 2017-05-05 16:16:02 +02:00
Valery Sizov 5004579b15 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into mia_backort[ci skip] 2017-05-05 16:59:31 +03:00
James Lopez adcff298f8 fixed all issues - not doing bulk create. 2017-05-05 10:43:56 +02:00
James Lopez cf002738e7 refactor a few things based on feedback 2017-05-04 18:11:28 +02:00
James Lopez 78d059141b add more examples for testing SQL 2017-05-04 16:41:07 +02:00
Valery Sizov 387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Sean McGivern ba608dc0f2 Merge branch '12910-uploader-pers-snippet' into 'master'
Prepare uploaders for personal snippets comments

See merge request !11022
2017-05-04 10:47:10 +00:00
James Lopez f81cf84035 refactor worker into service 2017-05-04 12:13:33 +02:00
Rémy Coutable 349e423137 Merge branch '29673-500-internal-server-error-when-enabling-a-deploy-key-more-than-once-through-api' into 'master'
Detect already enabled DeployKeys in EnableDeployKeyService

Closes #29673

See merge request !11010
2017-05-03 15:11:19 +00:00
Mark Fletcher d02e7226c4 Detect already enabled DeployKeys in EnableDeployKeyService
Ensures deploy keys can't be re-added, which causes a validation error
2017-05-03 17:37:08 +08:00
Jarka Kadlecova 43ff738641 Support uploaders for personal snippets comments 2017-05-02 15:22:24 +02:00
Robert Speicher d49768296c Auto-correct `RSpec/DescribedClass` violations 2017-05-01 11:13:33 -04:00
Toon Claes 69f584edb4 Make namespace owner master of project upon creation
When an admin creates a project in the namespace of a user, that user
automatically gains master access to that project.
2017-04-27 13:29:23 +02:00
Douglas Barbosa Alexandre bf0717802f Does not remove the GitHub remote when importing from GitHub 2017-04-18 00:22:33 +00:00
Stan Hu 460fb1faba Improve error messages when a record is unable to be created for a project 2017-04-13 16:19:25 -07:00
Grzegorz Bizon 44321b1a3d Merge branch 'master' into feature/multi-level-container-registry-images
* master: (57 commits)
  Ensure we generate unique usernames otherwise validations fail
  Fix a Knapsack issue that would load support/capybara.rb before support/env.rb
  Ensure users have a short username otherwise a click event is triggered ...
  Enable the `bullet_logger` setting; enable `raise` in test environment
  Fix Rubocop offenses
  Set the right timeout for Gitlab::Shell#fetch_remote
  Refactoring Projects::ImportService
  Move methods that are not related to mirroring to the repository model
  Fix GitHub pull request formatter spec
  Rename skip_metrics to imported on the importable concern
  Add CHANGELOG
  Remove unused include from RepositoryImportWorker
  Skip MR metrics when importing projects from GitHub
  Fetch GitHub project as a mirror to get all refs at once
  Make file templates easy to use and discover
  Ensure user has a unique username otherwise `user10` would match `user1`
  Ensure the AbuseReport fixtures create unique reported users
  Don't use FFaker in factories, use sequences instead
  Fix brittle specs
  Fix the AbuseReport seeder
  ...

Conflicts:
	db/schema.rb
2017-04-04 13:36:36 +02:00
Grzegorz Bizon cb2ce8452f Remove legacy registry tags when deleting a project 2017-04-04 12:57:38 +02:00
Douglas Barbosa Alexandre 6143642a5f Refactoring Projects::ImportService 2017-04-03 15:50:22 -03:00
Grzegorz Bizon baa00d5424 Refactor container registry repository tag stubs 2017-04-03 15:52:24 +02:00
Grzegorz Bizon fc550b398b Merge branch 'master' into feature/multi-level-container-registry-images
* master: (230 commits)
  Fix N+1 query in loading pipelines in merge requests
  Fix Spinach and Capybara dependencies
  Prevent users from disconnecting gitlab account from CAS
  30276 Move issue, mr, todos next to profile dropdown in top nav
  Refactor SearchController#show
  Properly eagerly-load the Capybara server for JS feature specs only
  Updating documentation to include a missing step in the update procedure
  Eager-load the Capybara server to prevent timeouts
  Increase Capybara's timeout
  Add metrics button to Environment Overview page
  Fix link to Jira service documentation
  Handle parsing OpenBSD ps output properly to display sidekiq infos on ...
  Eliminate unnecessary queries that add ~500 ms of load time for a large issue
  20914 Limits line length for project home page
  Allow users to import GitHub projects to subgroups
  Update dpl CI example
  Fix the docs:check:links job
  Don't clean up the gitlab-test-fork_bare repo
  Make GitLab use Gitaly for commit_is_ancestor
  Remove unnecessary ORDER BY clause from `forked_to_project_id` subquery
  ...
2017-04-03 09:36:09 +02:00
Grzegorz Bizon a7466af3a6 Improve code related to removing container image tags 2017-03-31 11:54:09 +02:00
Robert Speicher ca9a79f620 Use `:empty_project` where possible in service specs 2017-03-27 20:44:09 -04:00
Grzegorz Bizon 1a4c60ef57 Merge branch 'master' into feature/multi-level-container-registry-images
* master: (192 commits)
  Implement new service for creating user
  Update sentry-raven 2.0.2 -> 2.4.0
  Update webmock 1.21.0 -> 1.24.6
  Update spring 1.7.2 -> 2.0.1
  Update simplecov 0.12.0 -> 0.14.1
  Update pry-rails 0.3.4 -> 0.3.5
  Update pry-byebug 3.4.1 -> 3.4.2
  Update flay 2.6.1 -> 2.8.1
  Remove Tags filter from Projects Explore dropdown
  Update capybara-screenshot 1.0.11 -> 1.0.14
  Update bullet 5.2.0 -> 5.5.1
  Update brakeman 3.4.1 -> 3.6.1
  Remove web-console gem
  Update better_errors 1.0.1 -> 2.1.1
  Display flash message to unauthenticated user when creating new issue
  Fix up emoji tests that should have failed :/
  Fix RSpec/DescribeSymbol cop violations
  Add event limit warning all tabs Cycle Analytics
  Adding non_archived scope for counting projects
  Resolve "Gitlab administrator cannot create projects in every group"
  ...

Conflicts:
	db/schema.rb
2017-03-27 12:35:10 +02:00
Robert Speicher def164e761 Fix RSpec/DescribeSymbol cop violations 2017-03-24 19:04:03 -04:00
Grzegorz Bizon 7db1f22673 Fix specs for services related to container registry 2017-03-24 12:41:42 +01:00
Grzegorz Bizon dcd2eeb1cf Rename container image to repository in specs 2017-03-23 15:54:59 +01:00
Grzegorz Bizon 249084b48a Fix some specs using the old ContainerImage const 2017-03-23 14:48:24 +01:00
Grzegorz Bizon c5912ecd73 Merge branch 'master' into feature/multi-level-container-registry-images
* master: (1327 commits)
  Merge branch 'render-json-leak' into 'security'
  Merge branch 'ssrf' into 'security'
  Merge branch 'ssrf' into 'security'
  Merge branch 'fix-links-target-blank' into 'security'
  Merge branch '28058-hide-emails-in-atom-feeds' into 'security'
  Fix karma test
  Reset filters after click
  Handle Route#name being nil after an update
  Only add frontend code coverage instrumentation when generating coverage report
  fix recompile assets step in 9.0 upgrade guide to use yarn
  Undo explicit conversion to Integer
  Make level_value accept string integers
  Make feature spec more robust
  Removed d3.js from the main application.js bundle
  Extend compound status for manual actions specs
  Update css to be nice and tidy.
  Fix pipeline status for transition between stages
  add an index to the ghost column
  Return 404 in project issues API endpoint when project cannot be found
  Improve rename projects migration
  ...

Conflicts:
	doc/ci/docker/using_docker_build.md
	spec/lib/gitlab/import_export/all_models.yml
2017-03-21 14:22:56 +01:00
Douwe Maan 65aafb9917 Merge branch 'ssrf' into 'security'
Protect server against SSRF in project import URLs

See merge request !2068
2017-03-20 18:53:04 -07:00
Robert Speicher 2cfb67dfef Fix Projects::UploadService spec
For reasons unknown, this spec was passing a project's repository as the
first argument to `Projects::UploadService`, while it was expecting the
project itself.

Previously this wasn't a problem because `FileUploader` only needed the
object to respond to `path_with_namespace`, which Repository and Project
both did. But now because of `Upload` and its polymorphic association,
it expects the object to respond to `primary_key`.
2017-03-06 14:41:09 -05:00
Grzegorz Bizon 8f227f23a7 Improve docs and specs related to pages artifacts 2017-03-06 09:49:38 +01:00
Kamil Trzcinski 829cc80e1d
Delete artifacts for pages unless expiry date is specified 2017-03-05 23:34:20 +01:00
Douwe Maan 1fe7501b49 Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan 206953a430 Prefer leading style for Style/DotPosition 2017-02-23 09:32:22 -06:00
Douwe Maan 030baf70d2 Enable Performance/RedundantMerge 2017-02-23 09:31:57 -06:00
Andre Guedes e4fa80f3b6 Fixes broken and missing tests 2017-02-22 11:30:11 -03:00
Stan Hu 45f94ea78c Prevent project team from being truncated too early during project destruction
There are two issues with truncating the project team early:

1. `Projects::UnlinkForkService` may not close merge requests properly since
   permissions may be revoked early.

2. If an error is encountered during flushing of caches, then the user will
   lose all privileges, possibly causing an issue on deletion on retry.
2017-02-19 05:00:27 -08:00
Yorick Peterse ebae38394d
Refresh authorizations when transferring projects
This ensures that project authorizations are refreshed when moving a
project from one namespace to another. When doing so the permissions for
all users of both the old and new namespaces are refreshed.

See #26194 for more information.
2017-02-07 14:58:49 +01:00
Douwe Maan ee43dcd5d6 Merge branch 'fix-deleting-project-again' into 'master'
Skip or retain project while deleting the project:

Closes #15005

See merge request !8960
2017-02-06 19:54:34 +00:00
Douwe Maan c07311d486 Merge branch 'jej-pages-to-ce' into 'master'
Adding GitLab Pages to CE

Closes #14605, gitlab-com/infrastructure#1058, gitlab-ee#1333, and #323

See merge request !8463
2017-02-06 18:20:38 +00:00
Semyon Pupkov 3deb66ea56 Add traits for ProjectFeatures to Project factory
https://gitlab.com/gitlab-org/gitlab-ce/issues/24007
2017-02-05 13:11:45 +05:00
Lin Jen-Shin ad59f123f2 Test both execute and async_execute 2017-02-04 00:05:31 +08:00
Lin Jen-Shin 1868b8af25 Move the tests to spec/services/projects/destroy_service_spec.rb 2017-02-03 23:44:35 +08:00
Stan Hu 239743345a Fix GitLab Pages not refreshing upon new content
Due to autoloading and Ruby scoping, the .update file was never being
updated due to this error:

```
NoMethodError: undefined method `pages' for Projects::Settings:Module
        from /opt/gitlab/embedded/service/gitlab-rails/app/services/projects/update_pages_configuration_service.rb:50:in `pages_update_file'
        from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/instrumentation.rb:157:in `pages_update_file'
        from (irb):6
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/console.rb:110:in `start'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/console.rb:9:in `start'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:68:in `console'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.7.1/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:9:in `require'
```

This error was caught and discarded quietly. This fix exercises this code and fixes the scope problem.

Closes gitlab-com/infrastructure#1058
2017-02-01 23:09:12 +00:00
Yorick Peterse 91c07d16cd Fixed Rubocop deprecation warnings 2017-02-01 00:14:44 +00:00
Grzegorz Bizon 12d44272ec Fix Rubocop offenses 2017-02-01 00:13:47 +00:00
Kamil Trzcinski 109553afd0 Fix EE specs after ci_commit rename to pipeline 2017-01-31 22:55:32 +00:00