Commit Graph

91 Commits

Author SHA1 Message Date
GitLab Bot 4747b1ebc4 Add latest changes from gitlab-org/gitlab@master 2023-03-31 18:17:06 +00:00
GitLab Bot b90cf01a88 Add latest changes from gitlab-org/gitlab@master 2023-01-05 12:09:59 +00:00
GitLab Bot 8fa0c53e26 Add latest changes from gitlab-org/gitlab@master 2022-11-16 18:11:26 +00:00
GitLab Bot 7f35b02e86 Add latest changes from gitlab-org/gitlab@master 2022-11-14 21:10:12 +00:00
GitLab Bot e6fa9529b4 Add latest changes from gitlab-org/gitlab@master 2022-11-03 15:11:31 +00:00
GitLab Bot 077b0a79d5 Add latest changes from gitlab-org/gitlab@master 2022-10-03 12:08:27 +00:00
GitLab Bot db5097a28b Add latest changes from gitlab-org/gitlab@master 2022-09-08 09:10:45 +00:00
GitLab Bot 28515f6389 Add latest changes from gitlab-org/gitlab@master 2022-09-05 18:12:16 +00:00
GitLab Bot 06c57a8378 Add latest changes from gitlab-org/gitlab@master 2022-08-24 18:12:18 +00:00
GitLab Bot 67fa8362ae Add latest changes from gitlab-org/gitlab@master 2022-05-06 15:09:03 +00:00
GitLab Bot b57f24ba16 Add latest changes from gitlab-org/gitlab@master 2022-02-16 00:15:19 +00:00
GitLab Bot 05cde74f48 Add latest changes from gitlab-org/gitlab@master 2022-02-02 18:15:35 +00:00
GitLab Bot 60aef5496e Add latest changes from gitlab-org/gitlab@master 2021-11-12 18:12:20 +00:00
GitLab Bot a32e60a7ea Add latest changes from gitlab-org/gitlab@master 2021-05-20 12:10:26 +00:00
GitLab Bot 52b32eecb7 Add latest changes from gitlab-org/gitlab@master 2021-05-13 21:10:08 +00:00
GitLab Bot 4a882000a9 Add latest changes from gitlab-org/gitlab@master 2021-05-12 15:10:25 +00:00
GitLab Bot 5a7d44a955 Add latest changes from gitlab-org/gitlab@master 2020-10-29 12:08:50 +00:00
GitLab Bot 6a0085290e Add latest changes from gitlab-org/gitlab@master 2020-10-15 00:08:42 +00:00
GitLab Bot ea937d0916 Add latest changes from gitlab-org/gitlab@master 2020-07-31 15:10:14 +00:00
GitLab Bot fe29f106cd Add latest changes from gitlab-org/gitlab@master 2020-07-17 09:09:43 +00:00
GitLab Bot 777f6da99a Add latest changes from gitlab-org/gitlab@master 2020-06-29 21:09:07 +00:00
GitLab Bot c6f0b221b7 Add latest changes from gitlab-org/gitlab@master 2020-05-12 00:10:11 +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 aa0f0e9921 Add latest changes from gitlab-org/gitlab@master 2020-01-16 18:08:46 +00:00
GitLab Bot ab7cf450ba Add latest changes from gitlab-org/gitlab@master 2019-12-03 18:06:49 +00:00
GitLab Bot 7801d133b6 Add latest changes from gitlab-org/gitlab@master 2019-11-12 09:06:14 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Sam Battalio 3457695b1e Change HTTP Status Code when repository disabled 2019-06-24 22:12:42 +00:00
Lin Jen-Shin a96507bf00 Introduce ServiceResponse to wrap around response
See https://gitlab.com/gitlab-org/gitlab-ce/issues/60730
2019-04-22 17:16:32 +08:00
Stan Hu cedbb3366b Fix API /project/:id/branches not returning correct merge status
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24034 introduced
a regression where only the first 20 branches were used to determine
whether a branch has been merged because the pagination was applied
incorrectly. Requesting the second page of branches via the API would
always have the wrong merge status. We fix this by properly paginating
the branches before requesting their merge status.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56250
2019-03-30 05:20:29 -07: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
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
Robert Speicher c7d1eef671 Merge branch 'rubocop-code-reuse' into 'master'
Add RuboCop cops to enforce code reusing rules

See merge request gitlab-org/gitlab-ce!21391
2018-09-13 14:53:05 +00:00
🙈 jacopo beschi 🙉 f2747f1ce0 Resolve "500 Internal Server Error: Cherrypick commit with empty branch name" 2018-09-11 22:02:09 +00: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 a14e9cfde8 API: Use find_branch! in all places 2018-09-08 10:55:17 +02:00
Paul Slaughter 0d6e50d542 Create Web IDE MR and branch picker 2018-08-07 15:15:56 +00:00
Douwe Maan 8c5eff29de
Fix branch API can_push attribute and add specs 2018-06-25 18:39:23 +02:00
bunufi 47d4890d3a Update API: add search param to branches 2018-03-05 12:57:47 +00:00
Yorick Peterse cca61980d5
Track and act upon the number of executed queries
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.

In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.
2018-02-01 17:00:46 +01:00
James Edwards-Jones fceffe4dca Renamed ProtectedBranches::ApiUpdateService to LegacyApiUpdateService 2017-11-23 12:43:13 +00:00
Rémy Coutable b20984dea2
Improve performance of the /projects/:id/repository/branches API endpoint
Mitigate a N+1 requests to Gitaly problem. Still one left.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-11-06 13:31:23 +01:00
Jacopo 26ec874f77 Get Project Branch API shows an helpful error message on invalid refname
In API v4 when requesting a branch with an invalid refname shows an
helpful error message: 'The branch refname is invalid'.
2017-10-18 09:45:27 +02:00
Vitaliy @blackst0ne Klachkov c55a9ac4ae Remove 'Repo' prefix from API entites 2017-10-05 19:48:05 +11:00
Andrew Newdigate 64d7ec0a9e Detect n+1 issues involving Gitaly 2017-09-19 10:55:37 +00:00
blackst0ne 02aa269e34 Add branch existence check to the APIv4 branches via HEAD request 2017-09-05 20:54:12 +11:00
Sean McGivern b9d8946395 Don't use public_send in destroy_conditionally! helper
As we only override in two places, we could just ask for the value rather than
the method name.
2017-08-30 14:32:02 +01:00
Robert Schilling f0f3f38576 Use commit date for branches and tags 2017-08-28 16:40:25 +02:00