Commit Graph
2253 Commits
Author SHA1 Message Date
Douwe Maan 6ce25e7b4c Rename MergeRequest methods that return commits or shas to be more clear and consistent 2016-07-06 18:50:58 -04:00
Douglas Barbosa Alexandre 5f86a084f2 Consider that a GH exists only if both ref, and sha exist 2016-07-06 13:08:12 -03:00
Douglas Barbosa Alexandre 4e5de3e6ee Doesn't trigger Git hooks when cleaning up restored branches from GitHub 2016-07-06 13:08:12 -03:00
Robert Speicher be018ba8c4 Merge branch 'fix/import-url-validator' into 'master'
Fixing URL validation for import_url on projects

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17536

This MR fixes problems related to bypassing `import_url` validation on projects. This makes sure the URL is properly validated so we don't enter crap and fail while running workers that handle this URL.

It also adds a migration to fix current invalid `import_url`s

See merge request !4753
2016-07-06 15:06:01 +00:00
Rémy Coutable b73da89591 Merge branch 'fix/project-export-error' into 'master'
Add more debug info to import/export and memory killer

This should help debug https://gitlab.com/gitlab-org/gitlab-ce/issues/19124 further

See merge request !5108
2016-07-06 13:09:02 +00:00
James Lopez 09452715d3 fix typo 2016-07-06 11:09:07 +02:00
James Lopez 95f630daeb even more debug 2016-07-06 10:29:31 +02:00
Patricio Cano be221a30ac Revert back to not defining a default Git access protocol. 2016-07-05 16:54:22 -05:00
Patricio Cano 29c50c5315 Default Git access protocol to web 2016-07-05 16:54:22 -05:00
Patricio Cano fbaabb3911 Rename enabled_git_access_protocols to singular. 2016-07-05 16:54:22 -05:00
Patricio Cano d1151f7621 Don't allow empty strings in the protocol check. 2016-07-05 16:54:22 -05:00
Patricio Cano 9397ce9137 Correct access control flow for Git HTTP requests. 2016-07-05 16:54:22 -05:00
Patricio Cano da15471bb1 Clarify protocol access check, and make Git HTTP access call more specific. 2016-07-05 16:54:22 -05:00
Patricio Cano ace309d775 Raise an error if no protocol is passed to the GitAccess check. 2016-07-05 16:54:22 -05:00
Patricio Cano 8b14d1d2c2 Rename ENV['PROTOCOL'] to ENV['GL_PROTOCOL'] to conform to what GitLab Shell expects and make the protocol param in GitAccess mandatory. 2016-07-05 16:54:22 -05:00
Patricio Cano 7735ef86f0 Only allow Git Access on the allowed protocol 2016-07-05 16:54:22 -05:00
Robert Speicher aefb8a1741 Merge branch 'update-gemoji' into 'master'
Add lib/gitlab/emoji.rb instead of gitlab_emoji gem and upgrade Gemojione

- No reason to split it into a separate gem when the gem barely did anything. We can use gemojione directly, making updating gemojione that much easier. Unless there's a particularly good reason we were using the gem?
- Fixes the Rake task since it broke after all the AwardEmoji changes.
- Update gemojione to 2.6.1.

Spring Update changes! http://emojione.com/releases/#2.2.0

See merge request !4919
2016-07-05 17:08:35 +00:00
Paco Guzman 330de255b7 RailsCache metrics now includes fetch_hit/fetch_miss and read_hit/read_miss info. 2016-07-05 12:28:06 +02:00
Paco Guzman e9a4d117f2 Instrument cache fetch hit and cache fetch misses 2016-07-05 12:28:06 +02:00
Rémy Coutable 06c7d6f3a8 Merge branch 'refactor/ci-config-move-global-entries' into 'master'
Move global ci entries handling from legacy to new config

## What does this MR do?

This MR moves responsibility of handling global CI config entries (like `image`, `services`), from legacy `GitlabCiYamlProcessor` to new CI Config

## Why was this MR needed?

This is the next iteration of CI configuration refactoring

## 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 !4820
2016-07-05 08:37:16 +00:00
Dmitriy Zaporozhets fd2b2dc1de Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2016-07-04 21:52:43 +03:00
Valery Sizov 926a8ab476 Handle custom Git hook result in GitLab UI 2016-07-04 20:16:55 +03:00
Grzegorz Bizon bfad4c61f1 Add minor improvements in readability in CI config 2016-07-04 18:36:06 +02:00
Valery Sizov bf218337ed Better message for git hooks and file locks 2016-07-04 15:31:49 +03:00
Grzegorz Bizon eb151e77ff Extract CI configuration entry node factory method 2016-07-04 11:29:59 +02:00
Tomasz Maczukin f1a85747ca Merge branch 'master' into dev-master
* master: (98 commits)
  Enable Style/EmptyLines cop, remove redundant ones
  Update CHANGELOG
  Cache results from jQuery selectors to retrieve namespace name
  Fix import button when import fail due the namespace already been taken
  Fix snippets comments not displayed
  Fix emoji paths in relative root configurations
  Exclude requesters from Project#members, Group#members and User#members
  Upgrade Thin from 1.6.1 to 1.7.0.
  Many squashed commits
  Cache autocomplete results
  Upgrade Sidekiq from 4.1.2 to 4.1.4.
  Upgrade seed-fu from 2.3.5 to 2.3.6
  use has_many relationship with events
  Support creating a todo on issuables via API
  Expose target, filter by state as string
  Add todos API documentation and changelog
  Improve the request / withdraw access button
  Metrics for Rouge::Plugins::Redcarpet and Rouge::Formatters::HTMLGitlab
  Groundwork for Kerberos SPNEGO (EE feature)
  Update CHANGELOG 8.9.5 for runners related fixes
  ...
2016-07-02 22:58:21 +02:00
Grzegorz Bizon 9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Stan Hu 88dbc4d110 Merge branch 'fix-relative-root-emoji-support' into 'master'
Fix emoji paths in relative root configurations

## What does this MR do?

If a site specifies a relative URL root, emoji files would omit the path from the URL, leading to lots of 404s.

## Are there points in the code the reviewer needs to double check?

At first, I tried to use `ActionView::Helpers::AssetUrlHelper.asset_url` since this is what it's intended to do. But this helper function is extremely slow, and it took minutes to generate the URLs for the hundreds of links needed for each emoji.

## Why was this MR needed?

Because emojis were broken in relative URL installations

## What are the relevant issue numbers?

#15642

## 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
  - [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 !5027
2016-07-01 16:51:03 +00:00
Stan Hu 4bfe10d5f9 Fix emoji paths in relative root configurations
If a site specifies a relative URL root, emoji files would omit the path from
the URL, leading to lots of 404s.

Closes #15642
2016-07-01 09:10:12 -07:00
James Lopez f29c30475e use has_many relationship with events 2016-07-01 15:34:10 +02:00
James Lopez d6d0a35598 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/import-export-events 2016-07-01 14:52:38 +02:00
Eric K IdemaandRémy Coutable 12aa1f898d Import from Github using Personal Access Tokens.
This stands as an alternative to using OAuth to access a user's Github
repositories.  This is setup in such a way that it can be used without OAuth
configuration.

From a UI perspective, the how to import modal has been replaced by a full
page, which includes a form for posting a personal access token back to the
Import::GithubController.

If the user has logged in via GitHub, skip the Personal Access Token and go
directly to Github for an access token via OAuth.
2016-06-30 18:48:17 +02:00
Douwe Maan 5e6342b7ac Merge branch '19312-confidential-issue' into 'master'
Fix privilege escalation issue with OAuth external users

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/19312

This MR fixes a privilege escalation issue, where manually set external users would be reverted back to internal users if they logged in via OAuth and that provider was not in the `external_providers` list.

/cc @douwe 

See merge request !1975
2016-06-30 15:42:15 +00:00
James Lopez ef5713546b few more changes from suggestions 2016-06-30 17:22:56 +02:00
Robert Speicher 443d584253 Merge branch 'rubocop/enable-unneeded-capital-w-cop' into 'master'
Enable Style/UnneededCapitalW Rubocop cop

## What does this MR do?

This MR enables Rubocop cop that checks if `%W[]`, which supports interpolation, is needed.

## What are the relevant issue numbers?

#17478 

See merge request !5010
2016-06-30 15:21:53 +00:00
James Lopez 67f59ebd50 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/import-url-validator
# Conflicts:
#	spec/models/project_spec.rb
2016-06-30 14:37:48 +02:00
James Lopez 545b92af06 use class method 2016-06-30 14:30:07 +02:00
Grzegorz Bizon efd70c1878 Enable Style/UnneededCapitalW Rubocop cop 2016-06-30 13:31:52 +02:00
James Lopez 5b893d603d few changes based on feedback 2016-06-30 13:17:37 +02:00
Grzegorz Bizon b4f03e8b1e Improve description of CI types node and in specs 2016-06-30 12:59:17 +02:00
Alejandro Rodríguez 20b9bb2029 Create (if necessary) and link the gitlab-shell secret file on the rake install task 2016-06-29 22:30:33 -04:00
Alejandro Rodríguez 86359ec854 Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
Stan Hu d10642a4b8 Handle case when Redis cache returns an empty setting 2016-06-29 14:28:41 -07:00
Stan Hu c600cf8348 Fix database migrations when Redis is not running
If Redis were not running or USE_DB were set to false, the
application settings retrieval would fail completely. This
change only attempts to use the cache if the system actually
wants to connect to the DB and rescues any failures in talking to
Redis.

Closes #17557
2016-06-29 14:04:59 -07:00
Connor Shea f31f78cea3 Add emoji.rb in lib/gitlab instead of using the gitlab_emoji gem.
No reason to split it into a separate gem when the gem barely did anything. We can use gemojione directly, making updating gemojione that much easier.

Also fix the Rake task and update gemojione to 2.6.1. This adds the EmojiOne Spring update.

Changelog: https://github.com/jonathanwiesel/gemojione/blob/master/CHANGELOG.md
2016-06-29 14:53:09 -06:00
Patricio Cano 10444f61f8 Fixed privilege escalation issue where manually set external users would be reverted back to internal users if they logged in via OAuth and that provider was not in the external_providers list. 2016-06-29 10:37:54 -05:00
Grzegorz Bizon 28bafd5354 Enable Style/SpaceAfterComma Rubocop cop 2016-06-29 15:23:44 +02:00
Grzegorz Bizon 7ef11ce3de Explicitly define entry node class in new CI config 2016-06-29 12:20:45 +02:00
Grzegorz Bizon c8c930f3ff Add CI config entry validator for allowed keys 2016-06-29 11:01:26 +02:00
James Lopez 5cd3d7c40a bump version - as old exports wont be compatible 2016-06-29 10:49:31 +02:00