Shinya Maeda
d4b4693663
Abstract auto merge processes
...
We have one auto merge strategy today - Merge When Pipeline
Succeeds.
In order to add more strategies for Merge Train feature,
we abstract the architecture to be more extensible.
Removed arguments
Fix spec
2019-06-03 13:15:29 +07:00
Kerri Miller
c04ea58350
Revert "Merge branch '55127-add-delay-after-mr-creation-for-async-tasks-to-complete' into 'master'"
...
This reverts merge request !27978
2019-05-20 17:37:43 +00:00
Kerri Miller
29f9d92642
Confirm existence of head_pipeline if pipeline success required
...
Pipelines are created by an async worker, so a rapid sequence of API
calls can trigger a state where the pipeline, whose existence is part of
determining if we wait for the pipeline to successfully complete before
merging, can trigger the MR to be immediately merged instead.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55127
2019-05-07 16:06:53 +00:00
Stan Hu
d3fa9c9539
Fix remove_source_branch merge request API handling
...
Users attempting to set merge requests to `remove_source_branch` to
`false` would encounter an Error 500 because the UpdateService and API
checked `present?`, which would always return `false`. We now just
use `has_key?` to decide whether the parameter is present.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60530
2019-04-15 11:27:33 -07:00
Oswaldo Ferreira
ca884980ee
[CE] Support multiple assignees for merge requests
...
Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161
(code out of ee/ folder).
2019-04-08 18:40:00 -03:00
Paul Slaughter
59ac0924da
Fix IDE detecting MR from fork branch
...
**Why?**
Currently the IDE loads a merge request based on only the
`source_branch` name. This means it loads MR's from
forks that have the same branch name (not good).
- This required updating the BE API to accept `source_project_id`
2019-04-05 07:29:53 +00:00
Igor
9745d0de2f
Provide EE backports for filtering by approver feature
...
Adds custom validator for ArrayNoneAny param
Extracts some logic in js into separate files
2019-03-07 23:55:45 +00:00
Igor
e779477e8c
Revert "Merge branch 'id-1951-filter-merge-requests-by-approvers' into 'master'"
...
This reverts merge request !24982
2019-03-07 14:59:43 +00:00
Sean McGivern
3781cbe0c3
Merge branch 'sh-optimize-todos-api' into 'master'
...
Significantly reduce N+1 queries in /api/v4/todos endpoint
Closes #40378
See merge request gitlab-org/gitlab-ce!25711
2019-03-07 10:29:04 +00:00
Igor
572e3f2254
Provide EE backports for filtering by approver feature
...
Adds custom validator for ArrayNoneAny param
Extracts some logic in js into separate files
2019-03-07 07:06:54 +00:00
Stan Hu
062efe4f7a
Significantly reduce N+1 queries in /api/v4/todos endpoint
...
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
2019-03-06 07:03:46 -08:00
Alexandru Croitor
be3578d245
Add array support for labels
...
* Support label parameter as comma separated and array of strings
for merge requests and issues api endpoints
2019-03-06 13:28:42 +02:00
Mario de la Ossa
ee8cb2d1b3
PUT MergeRequest API endpoint - accept labels as an array
2019-03-06 12:56:29 +02:00
Oswaldo Ferreira
e8fbc070e0
Add API support for refreshing merge ref path
...
Add a merge_requests/:iid/merge_to_ref API which make
use of the groundwork to write merge results into
refs/merge-requests/:iid/merge.
2019-02-26 12:37:32 -03:00
Nick Thomas
c85a768ca5
Respect the should_remove_source_branch parameter to the merge API
2019-02-25 14:09:48 +00:00
Nermin Vehabovic
ff671366cb
Added: Include order by ID desc for tie breakers in pagination
2019-02-16 11:03:42 +01:00
Luke Duncalfe
b37266004c
API support for squash commit message during merge
...
Issues
https://gitlab.com/gitlab-org/gitlab-ce/issues/47149
https://gitlab.com/gitlab-org/gitlab-ce/issues/56014
2019-02-07 10:05:54 +13:00
Sean McGivern
068b41275f
Merge branch 'search-title' into 'master'
...
Add 'in' filter that modifies scope of 'search' filter to issues and merge requests API
See merge request gitlab-org/gitlab-ce!24350
2019-02-05 09:52:40 +00:00
Hiroyuki Sato
40198f8184
Fix grammar and spelling
2019-02-05 17:32:27 +09:00
Sam Bigelow
c607b35824
Use 'delete' instead of 'remove' for source branch
...
This is to match `git branch -D <branchname>`
2019-01-22 12:57:01 -05:00
Hiroyuki Sato
d32aec06fe
Add 'in' filter that modifies scope of 'search' filter to issues and merge requests API
2019-01-14 12:02:55 +09:00
Nick Thomas
93d6f56968
Merge branch 'if-52811-fix_namespaces_api_routing' into 'master'
...
Fix API::Namespaces routing to accept namepaces with dots
See merge request gitlab-org/gitlab-ce!22912
2018-11-30 15:08:56 +00:00
Nick Thomas
04ceb69f3e
Allow the status of a rebase to be determined
2018-11-28 12:57:47 +00: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
Nick Thomas
9f28729827
Add a rebase API endpoint for merge requests
2018-11-27 18:04:33 +00:00
Douwe Maan
34e8d9726d
Expose {closed,merged}_{at,by} in merge requests API index
2018-11-05 13:49:10 +01:00
Heinrich Lee Yu
bf1ed85a9d
Refactor api validator to separate class
2018-10-26 10:32:14 +08:00
Heinrich Lee Yu
006631f882
Apply similar change to MRs API
2018-10-26 10:32:14 +08:00
Chantal Rollison
38f3d59fd0
#13650 added wip search functionality and tests
2018-10-03 08:15:00 +00: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
🙈 jacopo beschi 🙉
20bd1e6b34
Resolve "Return how many commits the source branch is behind the target branch through the API"
2018-09-05 13:07:02 +00:00
Felipe Artur
fdb5f285f9
Retrieve merge request closing issues from database cache
2018-08-06 11:58:22 -03:00
Phil Hughes
e241fe6b78
added API docs
...
CHANGELOG
improved comments in API code
improved spec description
2018-07-05 15:44:56 +01:00
Phil Hughes
5428e91374
only include _html fields when asked for
2018-07-05 15:44:54 +01:00
Chantal Rollison
c2b622b2a4
Add locked state to merge request API
2018-06-28 07:12:00 -07:00
Robert Speicher
6ced2f1243
Merge branch '42751-rename-mr-maintainer-push' into 'master'
...
Rephrase Merge Request Maintainer Edit
See merge request gitlab-org/gitlab-ce!19061
2018-06-05 15:04:18 +00:00
Stan Hu
bd4bfcc641
Fix N+1 with source projects in merge requests API
...
Now that we are checking `MergeRequest#for_fork?`, we also need
the source project preloaded for a merge request.
2018-06-03 04:24:23 -07:00
Mark Chao
0d44f4d50e
Rephrase "maintainer" to more precise "members who can merge to the target branch"
...
"Maintainer" will be freed to be used for #42751
2018-06-01 14:33:12 +09:00
Felipe Artur
8ed12efecd
Add merge requests list endpoint for groups
2018-05-31 15:29:07 +00:00
blackst0ne
4cff66a6c4
Add 'squash and rebase' feature to CE
2018-05-29 20:51:43 +11:00
Mark Chao
d839b880a2
Add created_by_me and assigned_to_me scopes
...
Deprecate corresponding dash versions created-by-me and assigned-to-me
2018-05-21 09:55:30 +08:00
Bob Van Landuyt
71ccfde322
Correct permissions for creating merge requests from issues
...
This could only be possible for users that can create merge requests
within a project.
So they need to be a allowed to create a branch and create a merge request.
2018-04-11 10:51:17 +02:00
Bob Van Landuyt
9b27027619
Add documentation for allowing maintainers to push
2018-03-07 16:59:17 +01:00
Bob Van Landuyt
8b2ec23fef
Set `allow_maintainer_to_push` using the API
2018-03-07 16:59:17 +01:00
Lin Jen-Shin
156cc98d10
Unify lib/api/merge_requests.rb with EE
2018-03-06 01:44:51 +08:00
Sean McGivern
5a1da682a7
Merge branch '41616-api-issues-between-date' into 'master'
...
Resolve "API support for selecting only updated issues before/after a given date"
Closes #41616
See merge request gitlab-org/gitlab-ce!17417
2018-03-05 14:04:35 +00:00
Jacopo
168ff28506
Adds updated_at filter to issues and merge_requests API
2018-03-05 14:10:32 +01:00
haseeb
bb89412ffb
expose metrics in merge request api
2018-03-02 16:48:55 +00:00
Sean McGivern
2f7dffe548
Add source and target branch filters to merge requests API
2018-03-01 10:41:02 +00:00