Commit Graph

3166 Commits

Author SHA1 Message Date
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
Grzegorz Bizon 6b4926f2aa Merge commit '83f0798e7dc588f0e4cb6816daadeef7dbfc8b81' into fix/gb/encrypt-runners-tokens
* commit '83f0798e7dc588f0e4cb6816daadeef7dbfc8b81': (101 commits)
2018-12-04 09:11:33 +01:00
Nick Thomas 93d6f56968 Merge branch 'if-52811-fix_namespaces_api_routing' into 'master'
Fix API::Namespaces routing to accept namepaces with dots

See merge request gitlab-org/gitlab-ce!22912
2018-11-30 15:08:56 +00:00
Rémy Coutable 70b19fbdef Merge branch 'if-40385-prohibit_impersonation' into 'master'
Add config to prohibit impersonation

See merge request gitlab-org/gitlab-ce!23338
2018-11-29 09:53:09 +00:00
Grzegorz Bizon a7fec1779f Merge commit '6852680584a1b22788f451457a6042eabf862a73' into fix/gb/encrypt-runners-tokens
* commit '6852680584a1b22788f451457a6042eabf862a73': (57 commits)
2018-11-29 10:52:01 +01:00
Imre Farkas bd3a484032
Add config to disable impersonation
Adds gitlab.impersonation_enabled config option defaulting to true to
keep the current default behaviour.

Only the act of impersonation is modified, impersonation token
management is not affected.
2018-11-29 09:37:16 +01:00
Sean McGivern 6852680584 Merge branch '33705-merge-request-rebase-api' into 'master'
Add a rebase API endpoint for merge requests

Closes #33705

See merge request gitlab-org/gitlab-ce!23296
2018-11-29 08:36:04 +00:00
Nick Thomas 04ceb69f3e
Allow the status of a rebase to be determined 2018-11-28 12:57:47 +00:00
Grzegorz Bizon 0b8a2779e7 Merge branch 'master' into fix/gb/encrypt-runners-tokens
* master: (243 commits)

Conflicts:
	db/schema.rb
	lib/gitlab/import_export/import_export.yml
2018-11-28 13:14:04 +01:00
Imre Farkas b1e070bf49
Fix API::Namespaces to accept namepaces with dots
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
2018-11-28 12:54:11 +01:00
Douwe Maan 5e3076f2d7 Merge branch '50341-cleanup-useless-project-import-attributes' into 'master'
Removes all the irrelevant code and columns that were migrated from the Project…

See merge request gitlab-org/gitlab-ce!21497
2018-11-28 11:19:55 +00:00
Stan Hu 6c83c2d8b9 Merge branch 'lock-trace-writes' into 'master'
Lock writes to trace stream

Closes #51502

See merge request gitlab-org/gitlab-ce!23332
2018-11-27 20:56:40 +00:00
Nick Thomas 9f28729827
Add a rebase API endpoint for merge requests 2018-11-27 18:04:33 +00:00
Kamil Trzciński 31a1ce2132 Lock writes to trace stream 2018-11-27 17:55:20 +01:00
Tiago Botelho 4bd8a427d4
Removes all the irrelevant import related code and columns
Clears the import related columns and code from the Project
model over to the ProjectImportState model
2018-11-27 12:58:13 +00:00
Francisco Javier López 9a5703ec82 Set content disposition attachment to several endpoints 2018-11-23 16:44:09 +00:00
Grzegorz Bizon 2f3374be4c Merge branch 'optimise-job-request' into 'master'
Use cached size when passing artifacts to Runner

See merge request gitlab-org/gitlab-ce!23228
2018-11-21 14:00:06 +00:00
Grzegorz Bizon 88e2b6ea9f Merge remote-tracking branch 'dev/master' into security-encrypt-runners-tokens
* dev/master: (302 commits)

Conflicts:
	db/schema.rb
	lib/gitlab/import_export/import_export.yml
2018-11-21 11:02:31 +01:00
Grzegorz Bizon 747a5c425a Remove Rubocop override that is no longer necessary 2018-11-20 15:26:38 +01:00
Grzegorz Bizon b32a99474b Find a runner using encrypted project / group tokens 2018-11-20 15:25:24 +01:00
Kamil Trzciński c742d3ba98 Use cached size when passing artifacts to Runner 2018-11-20 11:05:37 +01:00
Heinrich Lee Yu b12456049e Change param name for consistency 2018-11-19 23:59:54 +08:00
Heinrich Lee Yu 2ec2a906b5 Add group projects API options for including shared and subgroups 2018-11-19 23:59:54 +08:00
Grzegorz Bizon 9c233fa972 Merge branch '41875-allow-pipelines-to-be-deleted-by-project-owners' into 'master'
Resolve "Allow pipelines to be deleted by project owners"

Closes #41875

See merge request gitlab-org/gitlab-ce!22988
2018-11-16 14:02:54 +00:00
Evan Read 38d234e2e5 Merge branch 'docs/rs-revert-api-version' into 'master'
Revert API is going into 11.5, not 11.6.

See merge request gitlab-org/gitlab-ce!23060
2018-11-16 04:06:29 +00:00
Stan Hu 1d16530501 Merge branch 'if-53347_fix_impersonation_tokens' into 'master'
Display impersonation token value only after creation

See merge request gitlab-org/gitlab-ce!22916
2018-11-15 19:06:28 +00:00
Robert Speicher f1f038956a
Revert API is going into 11.5, not 11.6. 2018-11-14 15:00:23 +01:00
Matija Čupić 0bc14b4522
Authorize DestroyPipelineService against pipeline 2018-11-13 17:24:10 +01:00
Matija Čupić 99203bfe23
Destroy pipeline in service
Move all logic for destroying a Pipeline into a service so it's easily
reusable.
2018-11-12 19:43:03 +01:00
Matija Čupić 5b45cd2463
Implement MVC for Pipeline deletion API 2018-11-12 16:27:28 +01:00
Imre Farkas f3cd24a9f3
Display impersonation token value only after creation
Since we migrated all PersonlAccessTokens to store only its hash in the
DB, the token value can no longer be shown to the user.
2018-11-12 12:16:25 +01:00
Sean McGivern ca3e9b9759 Merge branch 'blackst0ne-add-discord-service' into 'master'
Add Discord integration

Closes #21635

See merge request gitlab-org/gitlab-ce!22684
2018-11-12 10:12:48 +00:00
Nick Thomas 9adcd62df3 Merge branch 'rs-cherry-pick-api' into 'master'
Resolve possible cherry pick API race condition

Closes #53773

See merge request gitlab-org/gitlab-ce!22946
2018-11-09 17:29:19 +00:00
Robert Speicher 11dd9d6e1f
Resolve possible cherry pick API race condition
Previously, we just fetched the latest commit for the given branch when
presenting the resulting commit, but because something could have been
committed to that branch between the time we cherry-picked and the time
we render the result, the wrong commit could have been presented.

Now, we fetch the commit object with the commit SHA returned by the
commit change service, which should always be the correct commit.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53773
2018-11-09 16:38:59 +00:00
Robert Speicher 2331d3af63
Add revert to commits API 2018-11-09 15:26:38 +00:00
Sean McGivern 6d8810a64f Merge branch 'fj-41213-api-update-submodule-commit' into 'master'
Add endpoint to update a git submodule reference

Closes #41213

See merge request gitlab-org/gitlab-ce!20949
2018-11-07 15:11:30 +00:00