| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Remove duplicates returned by Issues#related_merge_requests API that
relies on ReferencedMergeRequestsService which returns 2 arrays one of
related MRs and one of related MRs that close the issue(i.e. a subset
of first one). We only need related MRs in this case so just pick the
first array.
|
|
|
|
|
|
|
|
|
| |
Expose head pipeline for the MR in the api when requesting
related merge requests for an issue and show a detailed
status for the pipeline, which would include:
details_path, favicon, group, icon, label, text, tooltip.
https://gitlab.com/gitlab-org/gitlab-ce/issues/57662#note_152023412
|
|
|
|
|
| |
This backports the parameters that EE adds to API::Issues, and wraps
them in conditionals so they are only used in EE.
|
|\
| |
| |
| |
| |
| |
| | |
Significantly reduce N+1 queries in /api/v4/todos endpoint
Closes #40378
See merge request gitlab-org/gitlab-ce!25711
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
By preloading associations and batching issuable metadata lookups,
we can significantly cut the number of SQL queries needed to load
the Todos API endpoint.
On GitLab.com, my own tests showed my user's SQL queries went
from 365 to under 60 SQL queries.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/40378
|
|/
|
|
|
| |
* Support label parameter as comma separated and array of strings
for merge requests and issues api endpoints
|
|
|
|
|
|
|
| |
Ability to filter confidential issues
Closes #50747
See merge request gitlab-org/gitlab-ce!24960
|
|
|
|
|
| |
This reverts commit d133bf84c668df3dfc9938bb04150754cb873c8b, reversing
changes made to 7981c0292b07a0138b096fa082341fcb13e9ce2b.
|
|
|
|
| |
Use internally only boolean params.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
'55376-related_merge_requests-api-call-returns-merge-requests-that-are-not-related-to-the-issue' into 'master'
Ensure that related_merge_requests api call returns merge requests in the correct scope
Closes #55376
See merge request gitlab-org/gitlab-ce!25222
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
Add 'in' filter that modifies scope of 'search' filter to issues and merge requests API
See merge request gitlab-org/gitlab-ce!24350
|
| | |
|
| |
| |
| |
| | |
requests API
|
|/
|
|
| |
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
|
|
|
| |
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
|
|
|
|
| |
This is more idiomatic than checking membership explicitly.
|
|
|
|
|
|
|
| |
- Allow `created_at` and `updated_at` parameters on Issues API
- Allow `created_at` on Issue Notes API
Closes gitlab-org/gitlab-ce#40059
|
| |
|
|
|
|
|
|
|
| |
This was being masked by the statement cache because only one author was used
per issue in the test..
Also adds support for an Rspec matcher `exceed_all_query_limit`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In CE, every `Issue` entity is also a `ProjectEntity`, which calls
`entity&.project.try(:id)` to show the project ID. In an API
request with 100 issues, this would hit the Rails statement cache 100 times
for the same project and cause unnecessary overhead as related models would
also be loaded.
In EE, we call `Issue#supports_weight?` for each issue, which then calls
`project&.feature_available?(:issue_weights)`. If the project is not
preloaded, this incurs additional overhead, as each individual Project
object has to be queried. This can lead to a significant performance hit.
In loading the CE project with 100 issues, this contributed to at least 22%
of the load time.
See https://gitlab.com/gitlab-org/gitlab-ce/issues/47031 for why testing this
is a bit tricky.
|
|\
| |
| |
| |
| |
| |
| | |
Resolve "API naming for issue scope"
Closes #44799
See merge request gitlab-org/gitlab-ce!18935
|
| |
| |
| |
| | |
Deprecate corresponding dash versions created-by-me and assigned-to-me
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
- Ensure that unwanted params are no passed to actual finder classes
|
|
|
|
|
|
|
|
|
| |
Prevent creating issues through API without having permissions
See merge request gitlab/gitlabhq!2225
(cherry picked from commit c298bbaa88883343dc9cbbb6abec0808fb3b546c)
915b97c5 Prevent creating issues through API without having permissions
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method can be called with an array, or a relation:
1. Arrays always have a limited amount of values, so that's fine.
2. If the relation does not have a limit value applied, then we will load every
single object in that collection, and prevent N+1 queries for the metadata
for that. But that's wrong, because we should never call this without an
explicit limit set. So we raise in that case, and this commit will see which
specs fail.
The only failing specs here were the issues API specs, and the specs for
IssuableMetadata itself, and both have been addressed.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
'master'
Add time stats to Issue and Merge Request API
Closes #28453
See merge request !13335
|