Commit Graph

58 Commits

Author SHA1 Message Date
GitLab Bot 638e2f1c5f Add latest changes from gitlab-org/gitlab@master 2023-06-06 15:09:27 +00:00
GitLab Bot 4ee706fcd1 Add latest changes from gitlab-org/gitlab@master 2022-12-01 12:09:35 +00:00
GitLab Bot 43feb20dca Add latest changes from gitlab-org/gitlab@master 2022-11-08 03:10:58 +00:00
GitLab Bot e6fa9529b4 Add latest changes from gitlab-org/gitlab@master 2022-11-03 15:11:31 +00:00
GitLab Bot bd1bebd1b0 Add latest changes from gitlab-org/gitlab@master 2022-03-22 18:08:29 +00:00
GitLab Bot b131b6f680 Add latest changes from gitlab-org/gitlab@master 2022-03-11 03:08:14 +00:00
GitLab Bot d4c968c95c Add latest changes from gitlab-org/gitlab@master 2021-06-21 12:07:45 +00:00
GitLab Bot a350f877c4 Add latest changes from gitlab-org/gitlab@master 2021-06-11 09:09:58 +00:00
GitLab Bot 98d7cc758f Add latest changes from gitlab-org/gitlab@master 2020-10-30 18:08:56 +00:00
GitLab Bot 6a0085290e Add latest changes from gitlab-org/gitlab@master 2020-10-15 00:08:42 +00:00
GitLab Bot 1850d48925 Add latest changes from gitlab-org/gitlab@master 2020-10-07 18:08:34 +00:00
GitLab Bot d022b7432e Add latest changes from gitlab-org/gitlab@master 2020-09-09 12:08:22 +00:00
GitLab Bot a0158b1a9c Add latest changes from gitlab-org/gitlab@master 2020-09-08 12:08:41 +00:00
GitLab Bot 4b9ace6c1f Add latest changes from gitlab-org/gitlab@master 2020-09-02 09:10:23 +00:00
GitLab Bot 304e230182 Add latest changes from gitlab-org/gitlab@master 2020-09-01 18:10:48 +00:00
GitLab Bot 71da5de44f Add latest changes from gitlab-org/gitlab@master 2020-08-05 15:09:59 +00:00
GitLab Bot fcda041fc0 Add latest changes from gitlab-org/gitlab@master 2020-07-09 12:08:56 +00:00
GitLab Bot ae1efa2e1d Add latest changes from gitlab-org/gitlab@master 2020-07-01 15:08:45 +00:00
GitLab Bot 777f6da99a Add latest changes from gitlab-org/gitlab@master 2020-06-29 21:09:07 +00:00
GitLab Bot 553a22402b Add latest changes from gitlab-org/gitlab@master 2020-05-19 12:08:21 +00:00
GitLab Bot 48650fe1bf Add latest changes from gitlab-org/gitlab@master 2020-05-18 12:08:08 +00:00
GitLab Bot 39a548dd06 Add latest changes from gitlab-org/gitlab@master 2020-05-04 15:09:38 +00:00
GitLab Bot 2e4d8b3449 Add latest changes from gitlab-org/gitlab@master 2020-04-28 03:09:53 +00:00
GitLab Bot f569792df8 Add latest changes from gitlab-org/gitlab@master 2020-04-27 18:09:41 +00:00
GitLab Bot e33f87ac0f Add latest changes from gitlab-org/gitlab@master 2020-04-21 15:21:10 +00:00
GitLab Bot e9c2bf2678 Add latest changes from gitlab-org/gitlab@master 2020-03-03 18:08:16 +00:00
GitLab Bot 5ad0cf2655 Add latest changes from gitlab-org/gitlab@master 2020-01-23 12:08:38 +00:00
GitLab Bot efb0c7f501 Add latest changes from gitlab-org/gitlab@master 2020-01-17 00:09:00 +00:00
Stan Hu fc52421b55 Standardize use of `content` parameter in snippets API
There was some confusion over whether `code` or `content` is the right
parameter for snippets. Internally, the database stores
`content`. However:

1. Project snippets use `code`. `code` gets remapped in `content` in
`lib/api/project_snippets.rb`.

2. Personal snippets use `content`.

To unify these APIs, allow an alias of `content` to work for project
snippets.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66673
2019-08-28 22:54:07 -07: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
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
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Robert Schilling 72b5c9af62 API: Catch empty code content for project snippets 2018-08-21 11:49:06 +02:00
🙈 jacopo beschi 🙉 c6b1043e9d Resolve "Make a Rubocop that forbids returning from a block" 2018-04-18 09:19:40 +00:00
Nick Thomas 1a3bcc76ea
Fix the user-agent detail API endpoint for project snippets 2018-01-17 14:30:07 +00:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Robert Schilling 6a2ee0968e API: Use defined project requirements 2017-08-31 14:57:47 +02:00
Robert Schilling e80313f9ee Conditionally destroy a ressource 2017-08-28 16:40:25 +02:00
Robert Schilling 998afa5f74 API: Respect the 'If-Unmodified-Since' for delete endpoints 2017-08-28 16:40:25 +02:00
Dmitriy Zaporozhets 6b8ad689da
Update grape gem
New version of the gem returns 200 status code on delete with content
instead of 204 so we explicitly set status code to keep existing
behavior

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-07-20 16:33:18 +03:00
James Lopez a9e8af3386 add spec and project snippet user agent details endpoint 2017-07-07 15:54:39 +02:00
Jarka Kadlecova 4464c22d6d Support descriptions for snippets 2017-05-31 07:17:03 +02:00
Douwe Maan ad309f5d11 Merge branch 'snippets-finder-visibility' into 'security'
Refactor snippets finder & dont return internal snippets for external users

See merge request !2094
2017-05-10 16:48:18 +02:00
Rémy Coutable 63360adeae
Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced API routes
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-16 18:00:24 +01:00
Toon Claes a3fdd6acd2 Use string based `visibility` getter & setter
Add `visibility` & `visibility=` methods to the
`Gitlab::VisibilityLevel` module so the `visibility_level` can be
get/set with a string value.
2017-03-02 12:15:25 +01:00
Toon Claes b2c2dfe545 Expose Project's & ProjectSnippet's VisibilityLevel as String
Instead of exposing the VisibilityLevel as Integer, expose it as
String `visibility` for Project and ProjectSnippet.

Filter queries also accept the `visibility` as String instead of
`visibility_level` as Integer.

Also remove the `public` boolean.
2017-03-02 09:33:24 +01:00
Oswaldo Ferreira 2ace39f242 Spam check and reCAPTCHA improvements 2017-02-21 13:32:49 -03:00
Sean McGivern c63194ce6f Check public snippets for spam
Apply the same spam checks to public snippets (either personal snippets
that are public, or public snippets on public projects) as to issues on
public projects.
2017-02-02 10:23:51 +00:00
Robert Schilling 74c8669b0a Use the pagination helper in the API 2016-12-04 18:11:19 +01:00
Robert Schilling b7bf1f3a9d Grapify the projects snippet API 2016-11-21 17:25:34 +01:00