Commit Graph

15406 Commits

Author SHA1 Message Date
Stan Hu ff4cc94413 Merge branch 'patch-31' into 'master'
Add missing provider_unauthorized method to import_github.rb

Closes #60347

See merge request gitlab-org/gitlab-ce!27218
2019-04-11 16:16:20 +00:00
Nick Thomas 0276b8682e Merge branch 'restore-hipchat' into 'master'
Revert "Remove HipChat integration from GitLab"

Closes #60042

See merge request gitlab-org/gitlab-ce!27172
2019-04-11 12:32:56 +00:00
Rémy Coutable 51119395e6 Merge branch 'revert-24704-download-repository-path' into 'master'
Revert "Merge branch '24704-download-repository-path' into 'master'"

See merge request gitlab-org/gitlab-ce!27249
2019-04-11 10:01:52 +00:00
Patrick Bajao 171818df0a Revert "Merge branch '24704-download-repository-path' into 'master'"
This reverts commit 6c75bd015c, reversing
changes made to 1be7f5aaa3.
2019-04-11 15:49:53 +08:00
Sean McGivern dd019c2e0b Merge branch 'jc-guard-against-empty-dereferenced_target' into 'master'
Guard against nil dereferenced_target

Closes #60076

See merge request gitlab-org/gitlab-ce!27192
2019-04-11 07:45:48 +00:00
Ben e925dddea7 Return a `401` error code 2019-04-11 06:43:09 +00:00
Thong Kuah d119d3d1b2 Align UrlValidator to validate_url gem implementation.
Renamed UrlValidator to AddressableUrlValidator to avoid 'url:' naming collision with ActiveModel::Validations::UrlValidator in 'validates' statement.
Make use of the options attribute of the parent class ActiveModel::EachValidator.
Add more options: allow_nil, allow_blank, message.
Renamed 'protocols' option to 'schemes' to match the option naming from UrlValidator.
2019-04-11 06:29:07 +00:00
Ben 0984637faf Fix trailing white space 2019-04-10 21:37:05 +00:00
Tim Zallmann fb8908d961 Removed also the in the meanwhile introduced rake task 2019-04-10 13:51:14 -07:00
Tim Zallmann c57529556c Revert "Merge branch 'tz-reorganise-digests-json' into 'master'"
Reverts the loading of emojis and its images to move forward with RC
2019-04-10 11:49:06 -07:00
John Cai 674b926ef4 Guard against nil dereferenced_target 2019-04-10 11:39:36 -07:00
Ben 6b546551b6 Add missing provider_unauthroized method to import_github.rb 2019-04-10 12:48:53 +00:00
Sean McGivern cd9ae6bb82 Revert "Remove HipChat integration from GitLab"
This reverts commit a5378665a1.
2019-04-10 12:58:18 +01:00
Douwe Maan e861af409d Merge branch '47327-fix-github-project-import-visibility' into 'master'
Fix GitHub project import visibility

See merge request gitlab-org/gitlab-ce!27133
2019-04-10 09:10:37 +00:00
Dylan Griffith c239bfcb17 Add more info logging to cluster apps
Log events so that it's easy to see
when different requests are starting.
2019-04-10 06:38:27 +00:00
Douglas Barbosa Alexandre 61ab1f7364 Merge branch 'docs-zj-update-n-plus-one-comments' into 'master'
Update comments about N + 1 Gitaly calls

See merge request gitlab-org/gitlab-ce!27178
2019-04-09 16:34:11 +00:00
Imre Farkas 9bc5ed14fe Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-09 15:38:58 +00:00
Zeger-Jan van de Weg 469844c4f9
Update comments about N + 1 Gitaly calls
To make sure all known issues are linked to the correct epic, I've gone
through the code base, and updated the comments where required.
2019-04-09 17:21:16 +02:00
Nick Thomas a6218f1bcd Merge branch 'osw-multi-assignees-merge-requests' into 'master'
[Backport] Support multiple assignees for merge requests

See merge request gitlab-org/gitlab-ce!27089
2019-04-09 15:19:36 +00:00
Agustin Henze 20093f9de0 Add new permission model `read-pipeline-variable`
Used to get the variables via the API endpoint
`/projects/:id/pipelines/:pipeline_id/variables`

Signed-off-by: Agustin Henze <tin@redhat.com>
2019-04-09 14:53:44 +00:00
Nick Thomas d95889b8a4 Merge branch '43263-git-push-option-to-create-mr' into 'master'
Git push options to create a merge request, set target_branch and set merge when pipeline succeeds

Closes #53198 and #43263

See merge request gitlab-org/gitlab-ce!26752
2019-04-09 12:53:07 +00:00
Yorick Peterse 7e22054a36 Merge branch 'osw-schedule-multiple-mr-assignees-ff-auto-enabling' into 'master'
Add methods to check dead and retrying jobs

See merge request gitlab-org/gitlab-ce!27149
2019-04-09 10:17:40 +00:00
Wolphin 0a4f44de83 Add environment url validation 2019-04-09 09:28:55 +00:00
Krasimir Angelov 724f19ba0a Add new API endpoint to expose single environment
This is resolving https://gitlab.com/gitlab-org/gitlab-ce/issues/30157.

Implement new API endpoint `/projects/:id/environments/:environment_id`
to expose single environment. Include information for environment's last
deployment if there is one.
2019-04-09 09:16:57 +00:00
Jason Goodman 5b7003282b Set release name when adding release notes to an existing tag
Also set the release sha and author
2019-04-09 06:52:15 +00:00
Luke Duncalfe 3c40c98e26 Feature flag for merge requestion push options
https://gitlab.com/gitlab-org/gitlab-ce/issues/43263
https://gitlab.com/gitlab-org/gitlab-ce/issues/53198
2019-04-09 10:57:04 +12:00
Luke Duncalfe e73f537cb5 Refactor PushOptionsHandlerService from review
Exceptions are no longer raised, instead all errors encountered are
added to the errors property.

MergeRequests::BuildService is used to generate attributes of a new
merge request.

Code moved from Api::Internal to Api::Helpers::InternalHelpers.
2019-04-09 10:57:01 +12:00
Oswaldo Ferreira 285fcb4744 Add methods to check dead and retrying jobs
It adds two methods for checking if a background job
(for a given class) has dead or retrying jobs.
2019-04-08 19:47:36 -03:00
Luke Duncalfe 68f189ad23 Support merge on pipeline success w/ push options
MergeRequests::PushOptionsHandlerService has been updated to allow
creating and updating merge requests with the
`merge_when_pipeline_succeeds` set using git push options.

To create a new merge request and set it to merge when the pipeline
succeeds:

  git push -u origin -o merge_request.create \
    -o merge_request.merge_when_pipeline_succeeds

To update an existing merge request and set it to merge when the
pipeline succeeds:

  git push -u origin -o merge_request.merge_when_pipeline_succeeds

Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/53198
2019-04-09 10:03:26 +12:00
Luke Duncalfe 1883e320ea Use Gitlab::PushOptions for `ci.skip` push option
Previously the raw push option Array was sent to Pipeline::Chain::Skip.

This commit updates this class (and the chain of classes that pass the
push option parameters from the API internal `post_receive` endpoint to
that class) to treat push options as a Hash of options parsed by
GitLab::PushOptions.

The GitLab::PushOptions class takes options like this:

    -o ci.skip -o merge_request.create -o merge_request.target=branch

and turns them into a Hash like this:

    {
      ci: {
        skip: true
      },
      merge_request: {
        create: true,
        target: 'branch'
      }
    }

This now how Pipeline::Chain::Skip is determining if the `ci.skip` push
option was used.
2019-04-09 10:03:26 +12:00
Oswaldo Ferreira ca884980ee [CE] Support multiple assignees for merge requests
Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161
(code out of ee/ folder).
2019-04-08 18:40:00 -03:00
Luke Duncalfe aa352a95df Support merge request create with push options
To create a new merge request:

  git push -u origin -o merge_request.create

To create a new merge request setting target branch:

  git push -u origin -o merge_request.create \
    -o merge_request.target=123

To update an existing merge request with a new target branch:

  git push -u origin -o merge_request.target=123

A new Gitlab::PushOptions class handles parsing and validating the push
options array. This can be the start of the standard of GitLab accepting
push options that follow namespacing rules. Rules are discussed in issue
https://gitlab.com/gitlab-org/gitlab-ce/issues/43263.

E.g. these push options:

  -o merge_request.create -o merge_request.target=123

Become parsed as:

  {
    merge_request: {
      create: true,
      target: '123',
    }
  }

And are fetched with the class via:

  push_options.get(:merge_request)
  push_options.get(:merge_request, :create)
  push_options.get(:merge_request, :target)

A new MergeRequests::PushOptionsHandlerService takes the `merge_request`
namespaced push options and handles creating and updating
merge requests.

Any errors encountered are passed to the existing `output` Hash in
Api::Internal's `post_receive` endpoint, and passed to gitlab-shell
where they're output to the user.

Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/43263
2019-04-09 09:36:42 +12:00
Michael Kozono b22a725a0c Merge branch 'sh-fix-issue-59985' into 'master'
Fix stage index migration failing in PostgreSQL 10

Closes #59985

See merge request gitlab-org/gitlab-ce!26972
2019-04-08 20:11:46 +00:00
Kamil Trzciński f15caf0109 Merge branch 'fix-pull-request-importer' into 'master'
Improve performance of PR import

See merge request gitlab-org/gitlab-ce!27121
2019-04-08 16:20:23 +00:00
Daniel Wyatt 26fdcf7b61 Fix GitHub project import visibility 2019-04-08 11:39:57 -04:00
Sean McGivern 4317a2a3a2 Fix `updated_at` doesn't apply to `state_event` updates of issues via API 2019-04-08 15:33:30 +00:00
Kamil Trzciński f3ad51f8a5 Improve performance of PR import
This removes unneeded `.reload` call which
makes AR to load ALL objects, and create its
in-memory representation.
2019-04-08 15:45:06 +02:00
Stan Hu d7c1bed80d GitHub import: Run housekeeping after initial import
After an initial fetch, the repository will have many loose objects
and refs. Running a `git gc` will compact refs into `packed-refs` and
objects into `.pack` files, which should make importing pull
requests faster.

Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/59477
2019-04-07 06:56:49 -07:00
Peter Leitzen bbb17ea1ea Handle possible HTTP exception for Sentry client
Prior this commit exceptions raised during a HTTP request
weren't caught by the Sentry client and were passed to the user.

In addition the Sentry client tried to catch a non-existent error
`Sentry::Client::SentryError`.

Now, the Sentry client catches all possible errors coming from
a HTTP request.
2019-04-07 07:51:36 +00:00
Tiger Watson f92438b878 Restore original Security/DAST.gitlab-ci.yml
Reverts https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26520
for Security/DAST.gitlab-ci.yml.
2019-04-06 16:02:04 +00:00
Stan Hu 7a7c131f7b Merge branch '58612-clean-up-notes-data' into 'master'
Clean up `noteable_id` for notes on commits

Closes #58612

See merge request gitlab-org/gitlab-ce!26104
2019-04-06 03:23:05 +00:00
Chris Baumbauer b77fe7db3e Add Knative metrics to Prometheus 2019-04-06 02:02:39 +00:00
Heinrich Lee Yu a8a4518099 Clean up `noteable_id` for notes on commits
This was incorrectly set by a bug in:
https://gitlab.com/gitlab-org/gitlab-ce/issues/54924

Also adds a `batch_size` option to `update_column_in_batches`
2019-04-06 08:29:51 +08:00
Douglas Barbosa Alexandre fcc771ba81 Merge branch 'sh-fix-realtime-changes-with-reserved-words' into 'master'
Fix real-time updates for projects that contain a reserved word

Closes #60113

See merge request gitlab-org/gitlab-ce!27060
2019-04-05 21:25:58 +00:00
Douglas Barbosa Alexandre d642cb18b4 Merge branch 'ce-10546-fix-epic-depth-validation' into 'master'
[CE-port] Fix Epic depth validation

See merge request gitlab-org/gitlab-ce!26390
2019-04-05 21:11:47 +00:00
Mayra Cabrera 135b78bb25 Revert "Merge branch 'bump_kubernetes_1_11_9' into 'master'"
This reverts merge request !26991
2019-04-05 20:22:50 +00:00
Michael Kozono d793d4a7c3 Merge branch 'duplicate-related-mrs' into 'master'
Remove duplicates from issue related merge requests

See merge request gitlab-org/gitlab-ce!27067
2019-04-05 20:07:05 +00:00
Alexandru Croitor c56970e3f7 Remove duplicates from issue related merge requests
Remove duplicates returned by Issues#related_merge_requests API that
relies on ReferencedMergeRequestsService which returns 2 arrays one of
related MRs and one of related MRs that close the issue(i.e. a subset
of first one). We only need related MRs in this case so just pick the
first array.
2019-04-05 22:17:07 +03:00
Stan Hu da0c9b0056
Fix real-time updates for projects that contain a reserved word
Projects that included reserved words (e.g. test-create) would fail to
generate a proper ETag key because of the name. To fix this, we add
forward slashes to match the exact name so that /test-create doesn't get
matched, but /create does.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60113
2019-04-05 11:59:20 -07:00
Gosia Ksionek 64858317ad Add part of needed code
Add columns to store project creation settings

Add project creation level column in groups
 and default project creation column in application settings

Remove obsolete line from schema

Update migration with project_creation_level column existence check

Rename migrations to avoid conflicts

Update migration methods

Update migration method
2019-04-05 18:49:46 +00:00