summaryrefslogtreecommitdiff
path: root/lib/api/merge_requests.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '39214__pipeline_api' into 'master'Sean McGivern2018-01-111-0/+16
|\ | | | | | | | | | | | | Add `pipelines` endpoint to merge requests API Closes #39214 See merge request gitlab-org/gitlab-ce!15454
| * Fix styleTony Rom2018-01-101-2/+3
| |
| * Add `pipelines` endpoint to merge requests APITony Rom2017-12-151-0/+15
| |
* | API: get participants from merge_requests & issuesBrent Greeff2018-01-051-0/+10
| |
* | Add optional `search` param for Merge Requests APIMark Fletcher2017-12-201-0/+1
| |
* | Employ declared_params in finder methods for MR and Issue API listsMark Fletcher2017-12-201-1/+1
|/ | | | - Ensure that unwanted params are no passed to actual finder classes
* Create issue and merge request destroy servicesGeorge Andrinopoulos2017-11-251-1/+3
|
* Use latest_merge_request_diff associationSean McGivern2017-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compared to the merge_request_diff association: 1. It's simpler to query. The query uses a foreign key to the merge_request_diffs table, so no ordering is necessary. 2. It's faster for preloading. The merge_request_diff association has to load every diff for the MRs in the set, then discard all but the most recent for each. This association means that Rails can just query for N diffs from N MRs. 3. It's more complicated to update. This is a bidirectional foreign key, so we need to update two tables when adding a diff record. This also means we need to handle this as a special case when importing a GitLab project. There is some juggling with this association in the merge request model: * `MergeRequest#latest_merge_request_diff` is _always_ the latest diff. * `MergeRequest#merge_request_diff` reuses `MergeRequest#latest_merge_request_diff` unless: * Arguments are passed. These are typically to force-reload the association. * It doesn't exist. That means we might be trying to implicitly create a diff. This only seems to happen in specs. * The association is already loaded. This is important for the reasons explained in the comment, which I'll reiterate here: if we a) load a non-latest diff, then b) get its `merge_request`, then c) get that MR's `merge_request_diff`, we should get the diff we loaded in c), even though that's not the latest diff. Basically, `MergeRequest#merge_request_diff` is the latest diff in most cases, but not quite all.
* Fix namespacing for MergeWhenPipelineSucceedsService in MR APIMark Fletcher2017-10-301-1/+1
|
* Merge branch '18608-lock-issues-v2' into 'master'Sean McGivern2017-10-061-1/+3
|\ | | | | | | | | | | | | Resolve "Lock issue and merge request" Closes #18608 See merge request gitlab-org/gitlab-ce!14531
| * Merge remote-tracking branch 'origin/master' into 18608-lock-issuesLuke "Jared" Bennett2017-09-201-1/+2
| |\
| * | Support discussion lock in the APIJarka Kadlecova2017-09-141-1/+3
| | |
* | | Remove 'Repo' prefix from API entitesVitaliy @blackst0ne Klachkov2017-10-051-2/+2
| |/ |/|
* | fix #35290 Make read-only API for public merge requests available without ↵haseeb2017-09-181-1/+2
|/ | | | authentication
* Add my_reaction_emoji param to /merge_requests APIHiroyuki Sato2017-09-051-0/+1
|
* API: Use defined project requirementsrs-api-use-project-requirementsRobert Schilling2017-08-311-1/+1
|
* Merge branch '28453-add-time-estimate-time-spent-to-api-issue-output' into ↵Robert Speicher2017-08-301-1/+1
|\ | | | | | | | | | | | | | | | | 'master' Add time stats to Issue and Merge Request API Closes #28453 See merge request !13335
| * Add time stats to issue and merge request API end pointsTravis Miller2017-08-291-1/+1
| |
* | Conditionally destroy a ressourceRobert Schilling2017-08-281-3/+1
| |
* | API: Respect the 'If-Unmodified-Since' for delete endpointsRobert Schilling2017-08-281-0/+2
|/
* Default /merge_request API endpoint to `scope=created-by-me`Toon Claes2017-07-281-1/+3
| | | | This matches the behavior of the /issues endpoint.
* Add top-level /merge_requests API endpointToon Claes2017-07-271-31/+64
| | | | | | | And add support for additional query parameters: - `author_id`: Returns merge requests created by the given user `id` - `assignee_id`: Returns merge requests assigned to the given user `id` - `scope`: Return merge requests for the given scope: `created-by-me`, `assigned-to-me` or `all`
* Support both internal and external issue trackersJarka Kadlecova2017-07-241-9/+8
|
* Update grape gemdz-update-grapeDmitriy Zaporozhets2017-07-201-0/+1
| | | | | | | | 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>
* Use view=simple for simplifying merge requests APIStan Hu2017-07-111-3/+3
|
* Add a simple mode to merge request APIsh-add-mr-simple-modeStan Hu2017-07-111-5/+20
| | | | | | | The current "basic" merge request API still loads too much data. For integrations like the Trello Power-up, we just need the basics. Closes #34920
* Fix sort ordering with merge request APIsh-improve-mr-apiStan Hu2017-07-101-4/+3
|
* Paginate the merge requests API earlier to avoid eager loading every merge ↵Stan Hu2017-07-101-1/+2
| | | | | | request Fixes a performance regression introduced in !12732
* Remove remaining N+1 queries in merge requests API with emojis and labelsStan Hu2017-07-081-3/+5
| | | | Closes #34159
* Remove many N+1 queries with merge requests APIsh-optimize-mr-apiStan Hu2017-07-071-1/+3
| | | | | | Identified via `ENABLE_BULLET=1 bundle exec rspec spec/requests/api/merge_requests_spec.rb:34` Improves speed of #34159
* Merge branch 'add-since-and-until-params-to-issuables' into 'master'Rémy Coutable2017-06-191-0/+2
|\ | | | | | | | | | | | | add created_after and created_before params to issuables Closes #32901 See merge request !12151
| * add since and until params to issuablesKyle Bishop2017-06-181-0/+2
| |
* | Fix API bug accepting wrong merge requests parametersissue_33205Felipe Artur2017-06-161-1/+1
|/
* Fix 404 when upstream has disabled merge requestsmhasbini2017-04-271-0/+2
|
* Ability to filter merge requests by labels and milestonesRobert Schilling2017-04-251-11/+14
|
* Fix updating merge_when_build_succeeds via merge API endpointmrchrisw-22740-merge-apiChris Wilson2017-04-241-3/+4
| | | | | | | | | | When updating a merge request via the `/merge` endpoint we check the `mergeable` and `mergeable_state` status, these will return `false` if the application option only_allow_merge_if_pipeline_succeeds is enabled. We should skip CI checks if the request uses the merge_when_pipeline_succeeds param Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22740
* Separate CE params on Grape APIOswaldo Ferreira2017-04-101-4/+19
|
* Remove `:id/merge_requests/:merge_request_iid/comments` endpointsToon Claes2017-03-271-35/+0
| | | | Comments for a merge request should be obtained to the `notes` endpoint.
* Add `requirements: { id: %r{[^/]+} }` for all projects and groups namespaced ↵Rémy Coutable2017-03-161-1/+1
| | | | | | API routes Signed-off-by: Rémy Coutable <remy@rymai.me>
* API routes referencing a specific merge request should use the MR `iid`Timothy Andrew2017-03-071-22/+22
| | | | | | - As opposed to the `id` that was previously being used. - This brings the API routes closer to the web interface's routes. - This is specific to API v4.
* Remove "subscribed" field from API responses returning list of issues or ↵api-drop-subscribedAdam Niedzielski2017-03-061-2/+10
| | | | merge requests
* Update occurrences of MWBS to MWPSfix/mwbs-to-mwpsJames Lopez2017-03-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename column in the database Rename fields related to import/export feature Rename API endpoints Rename documentation links Rename the rest of occurrences in the code Replace the images that contain the words "build succeeds" and docs referencing to them Make sure pipeline is green and nothing is missing. updated doc images renamed only_allow_merge_if_build_succeeds in projects and fixed references more updates fix some spec failures fix rubocop offences fix v3 api spec fix MR specs fixed issues with partials fix MR spec fix alignment add missing v3 to v4 doc wip - refactor v3 endpoints fix specs fix a few typos fix project specs copy entities fully to V3 fix entity error more fixes fix failing specs fixed missing entities in V3 API remove comment updated code based on feedback typo fix spec
* Paginate all endpoints that return an arrayRobert Schilling2017-02-161-1/+2
|
* Update MergeRequest API state_event option documentationjej-update-mr-state-event-docsJames Edwards-Jones2017-02-091-1/+1
|
* Remove deprecated MR and Issue endpoints and preserve V3 namespace9-0-api-changesOswaldo Ferreira2017-02-061-143/+131
|
* Merge branch 'fix-api-mr-permissions' into 'security'Robert Speicher2017-01-231-15/+10
| | | | | | Ensure that only privileged users can access merge requests in the API See merge request !2053
* Add some API endpoints for time tracking.Ruben Davila2017-01-181-10/+12
| | | | | | | | | | | | | | New endpoints are: POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_estimate" POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_time_estimate" POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/add_spent_time" POST :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/reset_spent_time" GET :project_id/(issues|merge_requests)/(:issue_id|:merge_request_id)/time_stats"
* Don't allow blank MR titles in APIapi-dont-allow-blank-mr-titlesRobert Schilling2016-12-131-2/+2
|
* Merge branch 'api-remove-source-branch' into 'master' Rémy Coutable2016-12-091-2/+6
|\ | | | | | | | | | | | | API: Ability to remove source branch Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23577 See merge request !7804
| * API: Ability to remove source branchapi-remove-source-branchRobert Schilling2016-12-041-2/+6
| |