Commit Graph

3020 Commits

Author SHA1 Message Date
Annabel Dunstone Gray c3ac731152 Add blue theme 2017-09-06 12:54:09 -05:00
Annabel Dunstone Gray 3c815f97d3 Add functionality for two themes 2017-09-06 12:54:09 -05:00
Rubén Dávila 6c49a62800 Restore some changes from !9199 2017-09-06 12:54:09 -05:00
Robert Speicher 86cbf60cbb Merge branch 'feature/migrate-branch-operations-to-gitaly' into 'master'
Migrate creating/deleting a branch to Gitaly

See merge request !13864
2017-09-06 17:26:05 +00:00
Douwe Maan 04f8874209 Merge branch 'url-sanitizer-fixes' into 'master'
Fix problems sanitizing URLs with empty passwords

Closes gitlab-ee#3352

See merge request !14083
2017-09-06 16:15:02 +00:00
Kamil Trzciński 29a34b3c28 Merge branch 'feature/gb/download-single-job-artifact-using-api' into 'master'
Add API endpoint for downloading a single job artifact

Closes #37196

See merge request !14027
2017-09-06 15:58:26 +00:00
Sean McGivern ba39b26cc2 Merge branch '35942_api_binary_encoding' into 'master'
API fix for non UTF-8 data

Closes #35942

See merge request !14038
2017-09-06 15:55:35 +00:00
Ahmad Sherif 41ef94e777 Migrate creating/deleting a branch to Gitaly 2017-09-06 17:25:17 +02:00
Yorick Peterse 235b105c91
Finish migration to the new events setup
This finishes the procedure for migrating events from the old format
into the new format. Code no longer uses the old setup and the database
tables used during the migration process are swapped, with the old table
being dropped.

While the database migration can be reversed this will 1) take a lot of
time as data has to be coped around 2) won't restore data in the
"events.data" column as we have no way of restoring this.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37241
2017-09-06 16:40:31 +02:00
Nick Thomas c8bdb20228 Remove blank passwords from sanitized URLs 2017-09-06 15:29:14 +01:00
Nick Thomas 759f34bd0a Backport EE fixes to Gitlab::UrlSanitizer to CE 2017-09-06 15:29:13 +01:00
micael.bergeron 46f6092a6d [ci-skip] spec for an instance method 2017-09-06 09:44:12 -04:00
Alexander Keramidas 4df54f2607 Profile updates from providers 2017-09-06 16:38:52 +03:00
Zeger-Jan van de Weg 8189347b49
Merge branch 'master' into zj-auto-devops-table 2017-09-06 15:16:38 +02:00
micael.bergeron 5625b0e453 add .json_safe_diff spec 2017-09-06 09:01:53 -04:00
Grzegorz Bizon 3b9f9aa00b Merge commit 'd1b60cbc67dc14b21820ef3f823a8e1ea851697d' into feature/gb/download-single-job-artifact-using-api
* commit 'd1b60cbc67dc14b21820ef3f823a8e1ea851697d': (210 commits)
2017-09-06 14:29:17 +02:00
Douwe Maan 9985296521 Merge branch 'AshleyDumaine/gitlab-ce-36994-toggle-for-automatically-collapsing-outdated-diff-comments' into 'master'
Add setting to collapse outdated diff comments on push

Closes #36994

See merge request !14053
2017-09-06 11:57:16 +00:00
Douwe Maan c1af169f1a Merge branch 'fix/import-export-performance' into 'master'
Improve Import/Export memory use and performance

Closes #35389 and #26556

See merge request !13957
2017-09-06 11:55:28 +00:00
Sean McGivern b40941db14 Fix note resolution specs 2017-09-06 10:10:16 +01:00
Ashley Dumaine ef4b3a39bc Add functionality to collapse outdated diff comments regardless of discussion resolution 2017-09-06 10:07:46 +01:00
Rubén Dávila 66cfb901c0 Optimize SQL queries used in Groups::GroupMembersController#create
The following optimizations were performed:

- Add new association to GroupMember and ProjectMember

  This new association will allow us to check if a user is a member of a
  Project or Group through a single query instead of two.

- Optimize retrieving of Members when adding multiple Users
2017-09-05 15:54:07 -05:00
James Lopez 104f221b60 fix specs 2017-09-05 21:06:27 +02:00
Ahmad Sherif e10437de40 Migrate Gitlab::Git::Repository#find_branch to Gitaly 2017-09-05 17:29:45 +00:00
Sean McGivern 9bb056e0f1 Merge branch 'fuzzy-issue-search' into 'master'
Fuzzy search issues / merge requests

Closes #26835, #29994, and #20362

See merge request !13780
2017-09-05 15:48:39 +00:00
James Lopez 1d57ae8f84 fix typo 2017-09-05 17:47:45 +02:00
James Lopez d8d05e5f28 refactor code a little 2017-09-05 17:47:45 +02:00
James Lopez 4119206f76 fix export performance of CI builds 2017-09-05 17:47:45 +02:00
Sean McGivern 8813089a64 Merge branch 'mr-index-page-performance' into 'master'
Re-use issue/MR counts for the pagination system

Closes #27168

See merge request !13805
2017-09-05 14:51:19 +00:00
Hiroyuki Sato 8bafe5d1ee Fix typo 2017-09-05 22:23:02 +09:00
Alexis Reigel 978252a3fa use new #verification_status 2017-09-05 12:18:33 +02:00
Alexis Reigel 00392d929b add verification_status: same_user_different_email
this is used to make a difference between a committer email that belongs
to user, where the user used a different email for the gpg key. this
means that the user is the same, but a different, unverified email is
used for the signature.
2017-09-05 12:18:32 +02:00
Alexis Reigel 2a89037b63 downcase gpg key's emails
this is necessary for email comparisons
2017-09-05 12:18:31 +02:00
Alexis Reigel c5e0bd56fb extract shared example 2017-09-05 12:18:31 +02:00
Alexis Reigel 64855c8e30 match the committer's email against the gpg key
the updated verification of a gpg signature requires the committer's
email to also match the user's and the key's emails.
2017-09-05 12:18:31 +02:00
Alexis Reigel 508ff17b34 pass whole commit to Gitlab::Gpg::Commit again
we need the commit object for the updated verification that also checks
the committer's email to match the gpg key and user's emails.
2017-09-05 12:18:31 +02:00
Grzegorz Bizon c53f319f88 Extract a class that represents artifacts file path 2017-09-05 12:17:56 +02:00
Yorick Peterse 42062a454a
Re-use issue/MR counts for the pagination system
This changes the issue and MR index pages so the pagination system
re-uses the output of the COUNT(*) query used to calculate the number of
rows per state (opened, closed, etc). This removes the need for an
additional COUNT(*) on both pages.
2017-09-05 11:53:45 +02:00
Shinya Maeda 68f6c61cf6 - Allow runner API to pass failure_reason
- Fix spec
2017-09-05 14:30:28 +09:00
Zeger-Jan van de Weg bcd70c4c46
Incorporate review 2017-09-04 15:44:46 +02:00
Kamil Trzciński a0c13698f9 Merge branch 'feature/gb/kubernetes-only-pipeline-jobs' into 'master'
Check if Kubernetes is required when creating pipeline jobs

Closes #34785

See merge request !13849
2017-09-04 12:30:27 +00:00
Douwe Maan a6f9470b4a Merge branch 'bvl-only-require-po-parser-in-rake' into 'master'
Only require `simple_po_parser` in rake task that needs it

Closes #37379

See merge request !14018
2017-09-04 10:21:48 +00:00
Grzegorz Bizon e23e86953d Merge branch 'master' into feature/gb/kubernetes-only-pipeline-jobs
* master: (469 commits)
2017-09-04 12:13:11 +02:00
Kamil Trzciński d449355f94 Merge branch 'feature/sm/33281-protected-runner-executes-jobs-on-protected-branch' into 'master'
Protected runner executes jobs on protected branch [Solution 1]

Closes #33281

See merge request !13194
2017-09-04 08:23:50 +00:00
Kamil Trzciński a343484bdf Merge branch 'zj-sort-templates' into 'master'
Sort templates when fetching them

Closes #37153

See merge request !13920
2017-09-04 08:18:41 +00:00
Zeger-Jan van de Weg a315e6025c
Merge branch 'master' into zj-auto-devops-table 2017-09-04 09:28:46 +02:00
Zeger-Jan van de Weg 78dad4cf32
Fix tests 2017-09-04 09:27:09 +02:00
Bob Van Landuyt 7199e882db Only require `simple_po_parser` in rake task that needs it
That way we don't need to install it in production, since it's really
not needed there.
2017-09-04 08:30:10 +02:00
Jose Ivan Vargas b623807682 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2017-09-03 16:09:59 -05:00
Shinya Maeda eab938d505 Fix typo 2017-09-03 23:49:11 +09:00
Shinya Maeda f3d3cecf5a Fix schema. Add safe_model_attributes for pipelines 2017-09-03 23:49:10 +09:00
Shinya Maeda 3875983205 Impprove spec by godfat suggestions 2017-09-03 23:49:10 +09:00
Shinya Maeda 1925bfd2a5 Fix spec 2017-09-03 23:49:10 +09:00
Shinya Maeda bbe967abeb Add the rest of specs 2017-09-03 23:49:10 +09:00
Robert Speicher 223849fa17 Merge branch '17849-allow-admin-to-restrict-min-key-length-and-techno' into 'master'
Add settings for minimum key strength and allowed key type

Closes #17849

See merge request !13712
2017-09-01 19:23:08 +00:00
Douwe Maan dceb2112d2 Merge branch 'bvl-validate-po-files' into 'master'
Validate PO files in static analysis

See merge request !13000
2017-09-01 14:30:43 +00:00
Douwe Maan 7d3e888d06 Merge branch '37202-revert-changes-to-signing-enabled' into 'master'
Rollback changes made to signing_enabled.

Closes #37202

See merge request !13956
2017-09-01 11:49:22 +00:00
Bob Van Landuyt 4761235f69 Validate unescaped `%` chars in PO files 2017-09-01 13:44:10 +02:00
Grzegorz Bizon fc4fb6e4d2 Change CI/CD kubernetes policy keyword to `active` 2017-09-01 13:04:08 +02:00
Tiago Botelho 37383d9a9d Rollsback changes made to signing_enabled. 2017-09-01 10:51:40 +01:00
Jacob Vosmaer (GitLab) 35acc4cbbe Make Gitaly PostUploadPack mandatory 2017-09-01 08:45:19 +00:00
Marin Jankovski 28060caa0a
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2017-09-01 09:21:18 +02:00
Dmitriy Zaporozhets 6f96ccaa7d Merge branch 'gitaly-shell-redis' into 'master'
Implement /internal/post_receive unified endpoint for PostReceive tasks

See merge request !13916
2017-09-01 06:49:28 +00:00
Zeger-Jan van de Weg 770bcf71bb
Form for setting project auto devops settings 2017-08-31 22:25:26 +02:00
Bob Van Landuyt 538104bdd1 Fetch all translation keys using a regex 2017-08-31 21:13:02 +02:00
Bob Van Landuyt abe198723d Take `nplurals` into account when validating translations. 2017-08-31 21:13:02 +02:00
Bob Van Landuyt 2c4f9b7a73 Check for newlines in different methods on TranslationEntry 2017-08-31 21:13:02 +02:00
Bob Van Landuyt f35a5d0d99 Split translation & metadata entries into classes 2017-08-31 21:13:01 +02:00
Bob Van Landuyt c6d969949e Validate the number of plurals in an entry 2017-08-31 21:13:01 +02:00
Bob Van Landuyt cdaf1072da Move detailed information of an entry into a separate class 2017-08-31 21:13:01 +02:00
Bob Van Landuyt 0fa0ed7d85 Move `PoLinter` into `Gitlab::I18n` 2017-08-31 21:13:00 +02:00
Bob Van Landuyt 49b3819477 Only perform `join_message` in `validate_variable_usage` 2017-08-31 21:13:00 +02:00
Bob Van Landuyt 1da594d39b Check newlines in translations 2017-08-31 21:13:00 +02:00
Bob Van Landuyt 973c697960 Add spec for languages without plurals 2017-08-31 21:13:00 +02:00
Douwe Maan 52ac5cf27c Merge branch '37266-nomethoderror-undefined-method-current_application_settings-build-failed-30837482' into 'master'
`current_application_settings` belongs on `Gitlab::CurrentSettings`

Closes #37266

See merge request !13955
2017-08-31 14:55:54 +00:00
Alejandro Rodríguez eaf60bb544 Implement /internal/post_receive unified endpoint for PostReceive tasks 2017-08-31 11:31:45 -03:00
Zeger-Jan van de Weg ed8f7ed671
Sort templates when fetching them
Used to rely on the underlying filesystem to sort the entries, now its
forced to be sorted on the name of the template.
2017-08-31 15:45:48 +02:00
Grzegorz Bizon ef030709eb Change kubernetes job policy allowed values
It is now possible to use `kubernetes: configured`.
2017-08-31 14:56:25 +02:00
Sean McGivern 5883ce95ef `current_application_settings` belongs on `Gitlab::CurrentSettings`
The initializers including this were doing so at the top level, so every object
loaded after them had a `current_application_settings` method. However, if
someone had rack-attack enabled (which was loaded before these initializers), it
would try to load the API, and fail, because `Gitlab::CurrentSettings` didn't
have that method.

To fix this:

1. Don't include `Gitlab::CurrentSettings` at the top level. We do not need
   `Object.new.current_application_settings` to work.
2. Make `Gitlab::CurrentSettings` explicitly `extend self`, as we already use it
   like that in several places.
3. Change the initializers to use that new form.
2017-08-31 13:38:33 +01:00
Bob Van Landuyt bde39322f1 Add a linter for PO files 2017-08-31 14:10:04 +02:00
Bob Van Landuyt b6646e778d Track the locale in Sentry so we know which ones are failing 2017-08-31 14:10:04 +02:00
Grzegorz Bizon 92673c2c63 Merge branch 'master' into feature/gb/kubernetes-only-pipeline-jobs
* master: (275 commits)
  Decrease Metrics/PerceivedComplexity threshold to 17
  Upgrade mail and nokogiri gems due to security issues
  Link out to stackoverflow answer on setting swappiness
  Document swappiness recomendations in the requirements doc
  Fix invalid attribute used for time-ago-tooltip component
  Update latest artifacts doc
  Add changelog entry for flipping verify_certificates
  Default LDAP config verify_certificates to true
  Update share project with groups docs
  remove accidental console.log from karma tests
  update specs to match reorganized monitoring components
  Remove tooltips from new sidebar
  Use `git update-ref --stdin -z` to delete refs
  Don't use public_send in destroy_conditionally! helper
  Remove unused expressions policy from ci/cd config
  Simplify code for appending strategies in CI/CD config
  Raise exception when simplifiable ci entry incomplete
  Add changelog entry
  Fix MySQL failure for emoji autocomplete
  max-width for lazy-loaded images (this was removed in the original MR through merge resolution most probably)
  ...

Conflicts:
	lib/gitlab/ci/config/entry/policy.rb
2017-08-31 14:02:52 +02:00
Sean McGivern 91a55ed6a1 Merge branch 'gitaly-440-shell-fetch-remote' into 'master'
Migrate Repository.FetchRemote to Gitaly

See merge request !13625
2017-08-31 11:08:45 +00:00
Marin Jankovski 7d38df306c
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2017-08-31 10:45:28 +02:00
Kamil Trzciński a0b5684634 Merge branch 'feature/gb/add-complex-jobs-only-except-config-policy' into 'master'
New syntax for CI/CD job triggering policy that supports variables expressions

See merge request !13769
2017-08-31 07:24:57 +00:00
Douwe Maan eacda4cc98 Merge branch '36743-existing-repo-master' into 'master'
[master] Prevent project creation (blank, import or fork) when repository already exists on disk

See merge request gitlab/gitlabhq!2169
2017-08-31 07:03:12 +00:00
Hiroyuki Sato 6edeff3d9c Fix MySQL spec errors 2017-08-31 13:43:56 +09:00
Nick Thomas b84ca08e35 Address review comments 2017-08-30 20:50:44 +01:00
Nick Thomas 6847060266 Rework the permissions model for SSH key restrictions
`allowed_key_types` is removed and the `minimum_<type>_bits` fields are
renamed to `<tech>_key_restriction`. A special sentinel value (`-1`) signifies
that the key type is disabled.

This also feeds through to the UI - checkboxes per key type are out, inline
selection of "forbidden" and "allowed" (i.e., no restrictions) are in.

As with the previous model, unknown key types are disallowed, even if the
underlying ssh daemon happens to support them. The defaults have also been
changed from the lowest known bit size to "no restriction". So if someone
does happen to have a 768-bit RSA key, it will continue to work on upgrade, at
least until the administrator restricts them.
2017-08-30 20:50:44 +01:00
Nick Thomas b0f982fbdf Add settings for minimum key strength and allowed key type
This is an amalgamation of:

* Cory Hinshaw: Initial implementation !5552
* Rémy Coutable: Updates !9350
* Nick Thomas: Resolve conflicts and add ED25519 support !13712
2017-08-30 20:50:44 +01:00
Kim "BKC" Carlbäcker b77176d11a Migrate Repository.FetchRemote to Gitaly
- `Gitlab::Shell.fetch_remote` now takes a `Gitlab::Git::Repository` instead
2017-08-30 20:51:56 +02:00
Hiroyuki Sato 59e5393827 Fuzzy search issuable title or description 2017-08-31 03:14:58 +09:00
Douwe Maan d6e956d3a8 Merge branch '36807-gc-unwanted-refs-after-import' into 'master'
Remove unwanted refs after importing a project

Closes #36807

See merge request !13766
2017-08-30 18:08:37 +00:00
Douwe Maan e68a1fc1be Merge branch 'check-trigger-permissions-mysql' into 'master'
Improve migrations using triggers

Closes #36633

See merge request !13666
2017-08-30 17:55:15 +00:00
Lin Jen-Shin c5553ce772 Use `git update-ref --stdin -z` to delete refs 2017-08-30 22:01:23 +08:00
Grzegorz Bizon 1bf87d2524 Remove unused expressions policy from ci/cd config 2017-08-30 14:47:54 +02:00
Grzegorz Bizon 808fb2549b Raise exception when simplifiable ci entry incomplete 2017-08-30 13:26:11 +02:00
Yorick Peterse 8274e0fe3c Merge branch 'improve-autocomplete-user-performance' into 'master'
Improve AutocompleteController#users.json performance

Closes #36879

See merge request !13754
2017-08-30 11:17:10 +00:00
Yorick Peterse 5eab624d3c
Improve migrations using triggers
This adds a bunch of checks to migrations that may create or drop
triggers. Dropping triggers/functions is done using "IF EXISTS" so we
don't throw an error if the object in question has already been dropped.
We now also raise a custom error (message) when the user does not have
TRIGGER privileges. This should prevent the schema from entering an
inconsistent state while also providing the user with enough information
on how to solve the problem.

The recommendation of using SUPERUSER permissions is a bit extreme but
we require this anyway (Omnibus also configures users with this
permission).

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36633
2017-08-29 13:02:44 +02:00
Hiroyuki Sato 12633b46b6 Refactor 2017-08-29 18:00:03 +09:00
Hiroyuki Sato 87b51c5981 Move the logic to a concern 2017-08-29 07:14:41 +09:00
James Lopez 49495fe63d fix spec 2017-08-28 15:24:24 +02:00
Hiroyuki Sato 866aab7f2a Fix escape characters was not sanitized 2017-08-26 22:32:55 +09:00
Grzegorz Bizon 5ce9e03f6c Use new complex only/except policy internal scheme 2017-08-26 11:11:28 +02:00
Grzegorz Bizon 15ace6a910 Merge commit '2be34630623711fc20ef8c101b5cef688f207cc1' into backstage/gb/rename-ci-cd-processing-sidekiq-queues
* commit '2be34630623711fc20ef8c101b5cef688f207cc1':
  Common Docker Documentation Location in `gitlab-ce`
  fix deprecation warning present during webpack compiles
  Enable 5 lines of Sidekiq backtrace lines to aid in debugging
  Add support for copying permalink to notes via more actions dropdown
  Handle creating a nested group on MySQL correctly
  Decrease statuses batch size even more in a migration
  Fix repo editor scrollbar
  Replace 'source/search_code.feature' spinach test with an rspec analog
  Authorizations regarding OAuth - style confirmation
  Update README.md
  Refactor complicated API group finding rules into GroupsFinder
  Fix group and project search for anonymous users
  Document version Group Milestones API introduced
  Allow v4 API GET requests for groups to be unauthenticated
  Adjust a range and a size in stages statuses migration
  Update README.md
  Point to /developers on docs/administration/authentiq.md
  Indexes GFM markdown guide
  use inline links instead of referenced
  Add index on ci_runners.contacted_at
2017-08-26 10:55:20 +02:00
Gabriel Mazetto 8f178c4222 Prevent new / renamed project from using a repository path that already exists on disk
There are some redundancies in the validation steps, and that is to
preserve current error messages behavior

Also few specs have to be changed in order to fix madness in validation
logic.
2017-08-25 20:06:06 +02:00
Grzegorz Bizon 0410861171 Add specs for attributable aspect of ci config entry 2017-08-25 18:26:55 +02:00
Grzegorz Bizon 4509594e20 Fix Rubocop offense in CI/CD only/except policy class 2017-08-25 17:54:14 +02:00
Sean McGivern f92a80b42a Merge branch 'bvl-fix-mysql-bare-repository-importer' into 'master'
Handle creating a nested group on MySQL correctly

See merge request !13829
2017-08-25 15:00:35 +00:00
Grzegorz Bizon 7e6bc4dde2 Improve reporting of a CI/CD entry config location 2017-08-25 15:16:09 +02:00
Kamil Trzciński a653c8ead4 Merge branch 'master' into 'backstage/gb/rename-ci-cd-processing-sidekiq-queues'
# Conflicts:
#   db/schema.rb
2017-08-25 12:10:53 +00:00
Bob Van Landuyt 529a07bd1e Handle creating a nested group on MySQL correctly
Since we don't support nested groups on MySQL, raise an error
explaining that on import instead of trying anyway.
2017-08-25 12:35:47 +02:00
Sean McGivern 4a2cc38197 Merge branch '36939-fix-find-blobs-by-path' into 'master'
Fix searching for files by path

Closes #36939

See merge request !13798
2017-08-25 10:26:12 +00:00
Grzegorz Bizon 946e8d3a93 Use only/except policy that returns an array 2017-08-25 12:01:59 +02:00
Grzegorz Bizon a061a2461a Fix CI/CD trigger policy default value 2017-08-25 11:42:40 +02:00
Hiroyuki Sato 9e203582b3 Improve AutocompleteController#user.json performance 2017-08-25 18:41:43 +09:00
Nick Thomas fa2915ec2d Fix searching for files by path 2017-08-25 10:36:32 +01:00
Grzegorz Bizon 873460783a Add specs for a simplifiable CI/CD entry aspect 2017-08-25 11:25:37 +02:00
Grzegorz Bizon fcb4d1f809 Implement complex only/except policy CI/CD config 2017-08-25 10:27:00 +02:00
Grzegorz Bizon 8c409fc40b Make it possible to define CI/CD config strategies 2017-08-25 09:49:18 +02:00
Robert Speicher 51ceacb1fc Add missing third argument to `Git::Repository#initialize` in spec 2017-08-24 17:34:05 -04:00
Sean McGivern e46a3d2fda Merge branch 'git-operation-user' into 'master'
Move GitHooksService into Gitlab::Git

See merge request !13739
2017-08-24 14:32:17 +00:00
Grzegorz Bizon 0d7d7c1057 Use aspect-oriented design in CI/CD config entries 2017-08-24 14:54:27 +02:00
Douwe Maan 610155e063 Merge branch 'fix-old-mr-diffs' into 'master'
Fix old MR diffs

Closes #36516

See merge request !13744
2017-08-24 10:56:57 +00:00
Grzegorz Bizon 5ced2d8d7d Rename CI/CD job triggering policy class to Policy 2017-08-24 12:22:01 +02:00
Sean McGivern e8525e107d Show un-highlighted diffs when blobs are the same
For some old merge requests, we don't have enough information to figure out the
old blob and the new blob for the file. This means that we can't highlight the
diff correctly, but we can still display it without highlighting.
2017-08-24 11:11:18 +01:00
Andrew Newdigate fb49c94e49 Delegate Repository::branch_exists? and ref_exists? to Gitlab::Git 2017-08-24 09:20:04 +00:00
Douwe Maan 93ad83443a Merge branch 'sh-fix-branch-count' into 'master'
Fix inconsistent number of branches when remote branches are present

Closes #36934

See merge request !13784
2017-08-24 07:42:30 +00:00
Stan Hu 37904108b9 Fix inconsistent number of branches when remote branches are present
Users of project mirrors would see that the number of branches did not
match the number in the branch dropdown because remote branches were
counted when Rugged was in use. With Gitaly, only local branches
are counted.

Closes #36934
2017-08-23 22:07:32 -07:00
Douwe Maan c1cf5f4101 Support simple string LDAP attribute specifications, and search for name rather than username attributes 2017-08-23 22:06:22 +02:00
Jacob Vosmaer 961da7d0a7 Add tests for Committer#== 2017-08-23 17:23:28 +02:00
Sean McGivern 9ec60b5030 Merge branch 'bvl-improve-bare-project-import' into 'master'
Make the import take subgroups into account

Closes #36664 and #30546

See merge request !13670
2017-08-23 14:04:22 +00:00
Bob Van Landuyt 22ef4ba3a4 Migrate creation of nested groups into a service 2017-08-23 13:36:38 +02:00
Bob Van Landuyt d8d2b73b9f Improve bare repository import
- Allow imports into nested groups
- Make sure it sets the correct visibility level when creating new
  groups

While doing this, I moved the import into a testable class, that made
it easier to improve.
2017-08-23 13:36:37 +02:00
Sean McGivern d546f7d36e Merge branch 'gitaly-commit-patch' into 'master'
Incorporate DiffService.CommitPatch Gitaly RPC

Closes gitaly#463

See merge request !13441
2017-08-23 10:39:01 +00:00
Jacob Vosmaer bc97931e2d Fix Hook.new call sites in tests 2017-08-23 10:45:20 +02:00
Jacob Vosmaer c47b947a73 Move GitHooksService tests 2017-08-23 10:45:20 +02:00
Jacob Vosmaer dc7c6bede2 Move GitHooksService to Gitlab::Git 2017-08-23 10:45:20 +02:00
Jacob Vosmaer 65f83941c3 Make gl_repository a G::G::Repository attribute 2017-08-23 10:45:20 +02:00
Alejandro Rodríguez 258d5a50e6 Incorporate DiffService.CommitPatch Gitaly RPC 2017-08-22 16:31:59 -03:00
Robert Speicher a6fbd8648e Stub `ForkedStorageCheck.storage_available?` by default in all specs
Add `:broken_storage` metadata to examples to disable this behavior only
when necessary.
2017-08-22 13:06:25 -04:00
Sean McGivern b0f09406f5 Always return a simple diff viewer
We didn't have a fallback case before, because we believed the conditions were
exhaustive. They weren't, so we can always fallback to not previewing.
2017-08-22 14:04:54 +01:00
Grzegorz Bizon 2e91f18143 Merge branch 'master' into backstage/gb/rename-ci-cd-processing-sidekiq-queues
* master: (115 commits)
  Use event-based waiting in Gitlab::JobWaiter
  Make sure repository's removal work for legacy and hashed storages
  Use `@hashed` prefix for hashed paths on disk, to avoid collision with existing ones
  Refactor project and storage types
  Prevent using gitlab import task when hashed storage is enabled
  Some codestyle changes and fixes for GitLab pages
  Removed some useless code, codestyle changes and removed an index
  Fix repository reloading in some specs
  Changelog
  Moving away from the "extend" based factory to a more traditional one.
  Enable automatic hashed storage for new projects by application settings
  New storage is now "Hashed" instead of "UUID"
  Add UUID Storage to Project
  Move create_repository back to project model as we can use disk_path and share it
  Codestyle: move hooks to the same place and move dependent methods to private
  Use non-i18n values for setting new group-level issue/MR button text
  indexes external issue tracker
  copyedit
  indexes user/search/ from /user/index
  Correctly encode string params for Gitaly's TreeEntries RPC
  ...
2017-08-22 14:58:10 +02:00
Grzegorz Bizon 3366e38cc1 Fix indentation in migration helpers 2017-08-22 14:57:54 +02:00
Sean McGivern ce89c425fe Merge branch 'fix/import-fork-mr' into 'master'
Fix Import/Export issue to do with fork merge requests

Closes #36666

See merge request !13717
2017-08-22 11:57:06 +00:00
Douwe Maan 78a0d27e98 Merge branch '34533-inline-single-authorized-projects' into 'master'
Use an event-based system when waiting for AuthorizedProjectsWorker to complete

See merge request !13564
2017-08-22 11:05:14 +00:00
Grzegorz Bizon 193b199672 Add Sidekiq migration helpers for migrating queues 2017-08-22 12:47:20 +02:00
Nick Thomas 6e8d0b78eb Use event-based waiting in Gitlab::JobWaiter 2017-08-22 09:54:46 +01:00
James Lopez e163c83b48 fix static analysis 2017-08-22 09:42:24 +02:00
James Lopez ac53067b64 fix specs 2017-08-22 08:59:01 +02:00
Robert Speicher 539ed0a637 Merge branch 'gitaly-tree-entries-encoding' into 'master'
Correctly encode string params for Gitaly's TreeEntries RPC

Closes #36720

See merge request !13724
2017-08-21 22:22:37 +00:00