Commit Graph

68 Commits

Author SHA1 Message Date
GitLab Bot 9cf7b70ac7 Add latest changes from gitlab-org/gitlab@master 2023-08-01 18:10:40 +00:00
GitLab Bot 3381023933 Add latest changes from gitlab-org/gitlab@master 2023-03-14 21:14:38 +00:00
GitLab Bot 936139e69c Add latest changes from gitlab-org/gitlab@master 2023-01-27 21:11:27 +00:00
GitLab Bot e38a99eb07 Add latest changes from gitlab-org/gitlab@master 2022-11-09 15:07:50 +00:00
GitLab Bot 758b97662c Add latest changes from gitlab-org/gitlab@master 2022-05-10 15:09:19 +00:00
GitLab Bot 67fa8362ae Add latest changes from gitlab-org/gitlab@master 2022-05-06 15:09:03 +00:00
GitLab Bot 48fc1ad899 Add latest changes from gitlab-org/gitlab@master 2022-01-21 15:13:54 +00:00
GitLab Bot e5e0589e09 Add latest changes from gitlab-org/gitlab@master 2021-04-26 12:09:44 +00:00
GitLab Bot b4e854a900 Add latest changes from gitlab-org/gitlab@master 2021-02-16 15:09:50 +00:00
GitLab Bot 7b2635a55d Add latest changes from gitlab-org/gitlab@master 2020-12-01 12:09:17 +00:00
GitLab Bot 825e4190a3 Add latest changes from gitlab-org/gitlab@master 2020-09-09 15:08:47 +00:00
GitLab Bot f9d0e89611 Add latest changes from gitlab-org/gitlab@master 2020-08-05 18:09:49 +00:00
GitLab Bot 08d789003a Add latest changes from gitlab-org/gitlab@master 2020-06-25 12:09:00 +00:00
GitLab Bot 3795b229ab Add latest changes from gitlab-org/gitlab@master 2020-05-01 00:09:59 +00:00
GitLab Bot 09093c1278 Add latest changes from gitlab-org/gitlab@master 2020-04-15 18:09:36 +00:00
GitLab Bot f505025346 Add latest changes from gitlab-org/gitlab@master 2020-04-08 09:09:43 +00:00
GitLab Bot 060c842402 Add latest changes from gitlab-org/gitlab@master 2020-04-08 00:09:30 +00:00
GitLab Bot 77237c5a6b Add latest changes from gitlab-org/gitlab@master 2020-03-05 00:07:49 +00:00
GitLab Bot b69f406585 Add latest changes from gitlab-org/gitlab@master 2020-02-15 00:08:48 +00:00
GitLab Bot 1ea1db491c Add latest changes from gitlab-org/gitlab@master 2020-01-27 15:08:51 +00:00
GitLab Bot 411cc77938 Add latest changes from gitlab-org/gitlab@master 2020-01-24 18:09:00 +00:00
GitLab Bot 98252e0dd6 Add latest changes from gitlab-org/gitlab@master 2020-01-20 12:09:02 +00:00
GitLab Bot 669c24d927 Add latest changes from gitlab-org/gitlab@master 2020-01-06 09:07:42 +00:00
GitLab Bot 511e761b41 Add latest changes from gitlab-org/gitlab@master 2020-01-03 15:08:33 +00:00
GitLab Bot fb73ca3398 Add latest changes from gitlab-org/gitlab@master 2019-12-27 15:08:16 +00:00
GitLab Bot e2334f3613 Add latest changes from gitlab-org/gitlab@master 2019-12-04 00:06:15 +00:00
GitLab Bot 33813f993b Add latest changes from gitlab-org/gitlab@master 2019-10-24 12:06:03 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Ash McKenzie 37cfaf27ab
Extract /internal/allowed API Actor logic out
Created new API::Support::GitAccessActor class to
encapsulate some of the more edge logic, making
the /internal/allowed route much cleaner.
2019-09-05 13:11:29 +10:00
Michael Kozono 50342028aa
Simplify internal post receive messages
Instead of sending varied data to Gitaly, and making Gitaly construct
various messages, build the messages first and have Gitaly print
either basic messages or alert messages, in the order they come.

Depends on https://gitlab.com/gitlab-org/gitaly/merge_requests/1410
2019-08-28 15:18:58 -07:00
Mayra Cabrera 0ab89d8e36 Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-10 19:26:47 +00:00
Luke Duncalfe 515f3eb44a Remove the mr_push_options feature flag
`Gitlab::QueryLimiting.whitelist` has been moved from being inside the
feature flag conditional check to the `process_mr_push_options`
`Api::Internal` helper.

https://gitlab.com/gitlab-org/gitlab-ce/issues/60250
2019-05-17 13:47:24 +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
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
Bob Van Landuyt d36415b754 Allow multiple repositories per project
This changes the repository type from a binary `wiki?` to a type. So
we can have more than 2 repository types.

Now everywhere we called `.wiki?` and expected a boolean, we check
that type.
2019-03-26 13:21:03 +01:00
Stan Hu 2c15cf471d Include gl_project_path in API /internal/allowed response
This will enable us to track the human-readable project path with SSH
access in gitlab-shell. Currently the Gitaly logs will only show the
hashed storage and gl_repository path (e.g. project-1234).
2019-02-16 06:57:28 -08:00
gfyoung 3836d69119 Enable frozen string in lib/api and lib/backup
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
2018-09-29 21:04:50 -07:00
Zeger-Jan van de Weg a33d591602
Don't pass the repository path to Gitlab Shell
This isn't a requirement, and removes deprecated method calls
2018-05-17 15:19:32 +02:00
Jacob Vosmaer (GitLab) b942462788 Remove support for absolute dirs from Git::Env 2018-03-30 09:19:46 +00:00
Alejandro Rodríguez cf1a1e9ac1 Send Gitaly payload for git-upload-archive SSH commands 2018-03-21 10:57:06 -03:00
Kim "BKC" Carlbäcker 3c0f6da546 Make git push mandatory 2018-03-06 15:17:00 +01:00
Tiago Botelho 1e56b3f476 Moves project creationg to git access check for git push 2018-02-06 16:52:29 +00:00
Tiago Botelho dc229c076c Abstracts ProjectMoved and ProjectCreated into a BaseProject 2018-02-06 13:35:35 +00:00
Tiago Botelho e42a548f1d Move new project on push logic to a service 2018-02-06 13:35:35 +00:00
Tiago Botelho bc78ae6985 Add specs 2018-02-06 13:35:35 +00:00
Tiago Botelho 32b2ff2601 Adds remote messsage when project is created in a push over SSH or HTTP 2018-02-06 13:35:35 +00:00
Jacob Vosmaer (GitLab) 583cff8d61 Default to Gitaly for 'git push' HTTP/SSH, and make Gitaly mandatory for SSH pull 2018-01-22 16:51:47 +00:00
Lin Jen-Shin 85be6d83be Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules
* upstream/master: (170 commits)
  support ordering of project notes in notes api
  Redirect to an already forked project if it exists
  Reschedule the migration to populate fork networks
  Create fork networks for forks for which the source was deleted.
  Fix item name and namespace text overflow in Projects dropdown
  Minor backport from EE
  fix link that was linking to `html` instead of `md`
  Backport epic tasklist
  Add timeouts for Gitaly calls
  SSHUploadPack over Gitaly is now OptOut
  fix icon colors in commit list
  Fix star icon color/stroke
  Backport border inline edit
  Add checkboxes to automatically run AutoDevops pipeline
  BE for automatic pipeline when enabling Auto DevOps
  I am certainly weary of debugging sidekiq but I don't think that's what was meant
  Ensure MRs always use branch refs for comparison
  Fix issue comment submit button disabled on GFM paste
  Lock seed-fu at the correct version in Gemfile.lock
  Improve indexes on merge_request_diffs
  ...
2017-11-30 15:20:00 +08:00
Kim "BKC" Carlbäcker a402056472 SSHUploadPack over Gitaly is now OptOut
- Better gitaly-handling in /api/internal/allowed specs
2017-11-29 08:21:41 +01:00
Lin Jen-Shin 07d3d44775 Move ModuleWithInstanceVariables to Gitlab namespace
And use .rubocop.yml to exclude paths we don't care,
rather than using the cop itself to exclude.
2017-11-22 17:06:57 +08:00