Commit Graph

3201 Commits

Author SHA1 Message Date
Douwe Maan cfa7108210 Merge branch '49231-import-issues-csv' into 'master'
Import issues from CSV

Closes #49231

See merge request gitlab-org/gitlab-ce!23532
2019-01-07 23:15:53 +00:00
Grzegorz Bizon 604073ffc3 Merge branch 'include-project' into 'master'
Allow to include another project files

Closes #53903

See merge request gitlab-org/gitlab-ce!24101
2019-01-07 09:19:36 +00:00
Kamil Trzciński c4d615c9dc Allow to include files from another projects
This adds `project:, file:, ref:` specification support.
2019-01-07 09:38:05 +01:00
Shinya Maeda 6bd7e1b876 Add tests for Release Link API
Add tests for the API and add a couple of tests

Add

revert

revert
2019-01-07 14:07:05 +09:00
Shinya Maeda 124905e23b Add API for release asset links
Authorize against release not project
2019-01-07 14:07:05 +09:00
Heinrich Lee Yu 63e9969ca3 Refactor upload service to return uploader
Also changes old calls to the service
2019-01-07 11:16:58 +08:00
Kamil Trzciński 647271c9fc Merge branch '40473-api-support-for-kubernetes-integration' into 'master'
Add API Support for Kubernetes integration

Closes #40473

See merge request gitlab-org/gitlab-ce!23922
2019-01-05 14:44:37 +00:00
Mayra Cabrera 013d262266 Include CRUD endpoints for Cluster API
Adds the following initial CRUD endpoints for Clusters API:

- GET list of clusters
- GET specific cluster
- POST add existing cluster (mimic of "Add cluster")
- PUT update cluser
- DELETE destroy cluster

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/40473
2019-01-04 15:12:44 -06:00
Douwe Maan 303f049358 Merge branch 'feature/gb/expose-ci-api-url-variable' into 'master'
Expose `CI_API_V4_URL` CI/CD variable

Closes #54621

See merge request gitlab-org/gitlab-ce!23936
2019-01-04 17:29:01 +00:00
Grzegorz Bizon 8707827d39 Improve readablity of CI_API_V4_URL related code 2019-01-04 15:32:40 +01:00
Shinya Maeda df7ed9eef2 Add unique constraint to release and url
Fix coding style

Improve coding style

Decouple UPDATE and DELETE operations of asset links

Rename links_attributes to assets:links

Rename exposed param and updated spec
2019-01-04 22:17:03 +09:00
Shinya Maeda 66755c9ed5 Support CURD operation for release asset links
- Add Releases::Links model
- Expose it in release API
- Add integration tests
2019-01-04 22:17:02 +09:00
Grzegorz Bizon 476cba6ff3 Minor improvements to CI_API_V4_URL variable exposure 2019-01-03 14:18:05 +01:00
Grzegorz Bizon f10fe3ae97 Add API::Helpers::Version and expose API root URL
This commits adds a new class that is supposed to represent Grape API
version, like `v3` or `v4`.
2019-01-03 14:18:05 +01:00
Grzegorz Bizon 128a5e410f Expose method that returns GitLab API paths 2019-01-03 14:18:05 +01:00
Douwe Maan ca6fbe8a79 Merge branch '18667-handle-push-opts' into 'master'
Handle 'git push -o ci.skip'

Closes #18667

See merge request gitlab-org/gitlab-ce!15643
2019-01-02 15:50:32 +00:00
John Jarvis 638582e001 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2019-01-01 22:52:05 +01:00
John Jarvis 9929351b59 Merge branch 'security-master-guests-jobs-api' into 'master'
[master] Guest users have access to all Job information via the API

See merge request gitlab/gitlabhq!2717
2019-01-01 20:38:21 +00:00
Jonathon Reinhart ba781484c7 Add support for Git push options, specifically ci.skip
gitlab-org/gitlab-shell!166 added support for collecting push options
from the environment, and passing them along to the
/internal/post_receive API endpoint.

This change handles the new push_options JSON element in the payload,
and passes them on through to the GitPushService and GitTagPushService
services.

Futhermore, it adds support for the first push option, ci.skip.  With
this change, one can use 'git push -o ci.skip' to skip CI pipe
execution. Note that the pipeline is still created, but in the "skipped"
state, just like with the 'ci skip' commit message text.

Implements #18667
2018-12-31 13:57:53 -05:00
Sean McGivern ca14b70d52 Merge branch 'fj-55781-fix-api-blob-content-disposition' into 'master'
Fixed content-disposition in blob and files API endpoint

Closes #55781

See merge request gitlab-org/gitlab-ce!24078
2018-12-31 13:42:54 +00:00
Francisco Javier López 2cd47bba9a
Fixed api content-disposition in blob and files endpoint 2018-12-31 13:02:32 +01:00
Shinya Maeda 8f1e96c89b Add spec for Release API
Add spec for all release API - GET, POST, PUT, DELETE.
Also, fixes some minior bugs.
2018-12-31 14:35:57 +09:00
Shinya Maeda dc8a8c7d99 Add delete method in Release API
Introduce DELETE endpoint in Release API
2018-12-31 14:35:14 +09:00
Alessio Caiazza 6a2decf545 Refactor Release services
CreateReleaseService and UpdateReleaseService now takes all the release
attributes as constructor parameters. This will simplify attribute
expansion
2018-12-31 14:34:15 +09:00
Alessio Caiazza a7aaad96f3 ReleasesFinder will always return a relation 2018-12-31 12:05:56 +09:00
Alessio Caiazza b9aac409a5 Expose assets in releases API 2018-12-31 12:05:56 +09:00
Alessio Caiazza 1ea2d9faa5 Add releases API
This commit introduces Releases API under /api/v4/projects/:id/releases

* We are introducing release policies at project level.
* We are deprecating releases changes from tags, both api and web
interface.
* Tags::CreateService no longer create a release

This feature is controlled by :releases_page feature flag
2018-12-31 12:05:56 +09:00
Stan Hu e7bd824484 Fix timeout issues retrieving branches via API
47d4890d changed the order of pagination so that the full list of
branches would be passed to Gitaly to determine which ones had been
merged, but this operation can timeout for large repositories with
many branches. We only need to determine whether the found branches have
been merged, so limit the scan to those.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55724
2018-12-27 04:24:37 -08:00
Stan Hu f5847911ca Bump Gitaly version to v1.12.0 2018-12-21 23:41:37 +00:00
Matija Čupić ccc227e667
Move pipeline auth above pipeline assignment 2018-12-20 04:09:47 +01:00
Jarka Košanová b1c3955385 Rename GroupHierarchy into ObjectHierarchy
- we now use the hierarchy class also for epics
- also rename supports_nested_groups? into supports_nested_objects?
  - move it to a concern
2018-12-19 15:24:29 +01:00
Matija Čupić 89b856e76c
Authorize read_pipeline before read_build 2018-12-19 14:50:40 +01:00
Matija Čupić a1c77f2d34
Authorize read_build when listing pipeline jobs 2018-12-19 14:50:40 +01:00
Matija Čupić c7ea28612a
Authorize read_build action when listing jobs 2018-12-19 14:50:35 +01:00
Bob Van Landuyt 28acd2b087 Hide confidential events in ruby
We're filtering the events using `Event#visible_to_user?`.

At most we're loading 100 events at once.

Pagination is also dealt with in the finder, but the resulting array
is wrapped in a `Kaminari.paginate_array` so the API's pagination
helpers keep working. We're passing the total count into that
paginatable array, which would include confidential events. But we're
not disclosing anything.
2018-12-17 18:47:53 +01:00
Jasper Maes 56296f1eda Remove rails4 specific code 2018-12-16 10:48:41 +01:00
Jasper Maes c8d1ca7a5a Fix deprecation: Passing ActiveRecord::Base objects to sanitize_sql_hash_for_assignment 2018-12-13 21:48:43 +01:00
Oswaldo Ferreira ed3034bbb7 Allow suggesting single line changes in diffs 2018-12-13 19:17:19 +00:00
Grzegorz Bizon c79c8739b6 Merge branch '54626-able-to-download-a-single-archive-file-with-api-by-ref-name' into 'master'
Add endpoint to download single artifact by ref

Closes #54626

See merge request gitlab-org/gitlab-ce!23538
2018-12-10 10:52:30 +00:00
Stan Hu e17ccef5ca Merge branch 'store-correlation-logs' into 'master'
Log and pass correlation-id between Unicorn, Sidekiq and Gitaly

See merge request gitlab-org/gitlab-ce!22844
2018-12-07 15:29:00 +00:00
Steve Azzopardi 401f65c43a
Add endpoint to download single artifact by ref
Add a new endpoint
`projects/:id/jobs/artifacts/:ref_name/raw/*artifact_path?job=name`
which is the close the web URL for consistency sake. This endpoint can
be used to download a single file from artifacts for the specified ref
and job.

closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54626
2018-12-07 15:33:30 +01:00
Rubén Dávila b2cf4b9525 Backports some changes from gitlab-ee!7885 2018-12-07 08:29:53 -05:00
Kamil Trzciński 39c1731a53 Log and pass correlation-id between Unicorn, Sidekiq and Gitaly
The Correlation ID is taken or generated from received X-Request-ID.
Then it is being passed to all executed services (sidekiq workers
or gitaly calls).

The Correlation ID is logged in all structured logs as `correlation_id`.
2018-12-06 20:46:14 +01:00
Cindy Pallares a50c777d95 Merge branch '54857-fix-templates-path-traversal' into 'master'
[master]: Prevent a path traversal attack on global file templates

Closes #2745

See merge request gitlab/gitlabhq!2677
2018-12-06 18:38:43 +00:00
Rémy Coutable 69b2a78826 Merge branch 'blob-count2' into 'master'
Support unlimited file search in web UI and API

See merge request gitlab-org/gitlab-ce!23553
2018-12-06 16:59:45 +00:00
Jan Provaznik 58bfd73331 Optimized file search to work without limits
* removed 100 limit on file search results because we
  load all results anyway
* expensive processing (parsing match content, utf encoding)
  is done only for selected page in paginated output
2018-12-06 09:25:09 +01:00
Francisco Javier López a6778fc647 Rename project's pipelines relation 2018-12-05 14:39:15 +00:00
Nick Thomas 69645389e9
Prevent a path traversal attack on global file templates
The API permits path traversal characters like '../' to be passed down
to the template finder. Detect these requests and cause them to fail
with a 500 response code.
2018-12-05 14:12:35 +00:00
Grzegorz Bizon 1c9b10016a Merge branch '54826-use-read_repository-scope-on-read-only-files-endpoints' into 'master'
Resolve "Use read_repository scope on read-only files endpoints"

Closes #54826

See merge request gitlab-org/gitlab-ce!23534
2018-12-05 11:34:06 +00:00
James Lopez 1c34a2a014
Use read_repository scope on read-only files API 2018-12-04 11:55:34 +01:00