Commit Graph

318 Commits

Author SHA1 Message Date
GitLab Bot 3bd9ad5574 Add latest changes from gitlab-org/gitlab@master 2021-03-25 03:09:35 +00:00
GitLab Bot 889bf7a0ee Add latest changes from gitlab-org/gitlab@master 2021-03-16 18:11:53 +00:00
GitLab Bot 5231344d99 Add latest changes from gitlab-org/gitlab@master 2021-02-11 15:09:11 +00:00
GitLab Bot 89f3fa0b96 Add latest changes from gitlab-org/gitlab@master 2021-02-04 00:09:18 +00:00
GitLab Bot ea037b9157 Add latest changes from gitlab-org/gitlab@master 2021-01-21 09:08:52 +00:00
GitLab Bot 2eaa60e455 Add latest changes from gitlab-org/gitlab@master 2020-11-26 15:09:30 +00:00
GitLab Bot 554826c701 Add latest changes from gitlab-org/gitlab@master 2020-11-12 03:09:17 +00:00
GitLab Bot ce27ba9f6c Add latest changes from gitlab-org/gitlab@master 2020-10-29 18:09:11 +00:00
GitLab Bot 6a0085290e Add latest changes from gitlab-org/gitlab@master 2020-10-15 00:08:42 +00:00
GitLab Bot 9689350c65 Add latest changes from gitlab-org/gitlab@master 2020-09-14 21:09:27 +00:00
GitLab Bot c787c1559e Add latest changes from gitlab-org/gitlab@master 2020-08-13 18:10:36 +00:00
GitLab Bot 36b0a5b875 Add latest changes from gitlab-org/gitlab@master 2020-07-21 18:09:45 +00:00
GitLab Bot ccefff8087 Add latest changes from gitlab-org/gitlab@master 2020-07-18 00:09:34 +00:00
GitLab Bot 651917dbac Add latest changes from gitlab-org/gitlab@master 2020-07-15 21:09:26 +00:00
GitLab Bot c7b780b56d Add latest changes from gitlab-org/gitlab@master 2020-07-10 21:09:29 +00:00
GitLab Bot ff1701e51d Add latest changes from gitlab-org/gitlab@master 2020-07-10 06:09:23 +00:00
GitLab Bot 1c75400c24 Add latest changes from gitlab-org/gitlab@master 2020-07-03 09:08:53 +00:00
GitLab Bot 777f6da99a Add latest changes from gitlab-org/gitlab@master 2020-06-29 21:09:07 +00:00
GitLab Bot d48cbe1786 Add latest changes from gitlab-org/gitlab@master 2020-06-08 21:09:17 +00:00
GitLab Bot ead1d2523c Add latest changes from gitlab-org/gitlab@master 2020-06-04 15:08:21 +00:00
GitLab Bot 4d5ee2b814 Add latest changes from gitlab-org/gitlab@master 2020-05-27 15:08:11 +00:00
GitLab Bot 927df95cc4 Add latest changes from gitlab-org/gitlab@master 2020-05-15 12:08:28 +00:00
GitLab Bot 0e1a6f6a2b Add latest changes from gitlab-org/gitlab@master 2020-05-12 09:09:31 +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 074d013e1e Add latest changes from gitlab-org/gitlab@master 2020-03-23 15:09:36 +00:00
GitLab Bot b042382bbf Add latest changes from gitlab-org/gitlab@master 2020-02-05 18:09:06 +00:00
GitLab Bot 536aa3a1f4 Add latest changes from gitlab-org/gitlab@master 2020-01-30 15:09:15 +00:00
GitLab Bot 23288f62da Add latest changes from gitlab-org/gitlab@master 2020-01-29 15:08:59 +00:00
GitLab Bot 727b1a890c Add latest changes from gitlab-org/gitlab@master 2020-01-16 21:08:24 +00:00
GitLab Bot 74a89b1221 Add latest changes from gitlab-org/gitlab@master 2020-01-13 21:07:39 +00:00
GitLab Bot f32a580aa1 Add latest changes from gitlab-org/gitlab@master 2020-01-13 18:08:05 +00:00
GitLab Bot b0bfadd486 Add latest changes from gitlab-org/gitlab@master 2019-12-30 12:09:15 +00:00
GitLab Bot fb73ca3398 Add latest changes from gitlab-org/gitlab@master 2019-12-27 15:08:16 +00:00
GitLab Bot 34b3567c97 Add latest changes from gitlab-org/gitlab@master 2019-11-19 09:06:16 +00:00
GitLab Bot 6e81d7f628 Add latest changes from gitlab-org/gitlab@master 2019-11-15 15:06:12 +00:00
GitLab Bot ae72d71da8 Add latest changes from gitlab-org/gitlab@master 2019-11-08 21:06:38 +00:00
GitLab Bot 8dfb94309c Add latest changes from gitlab-org/gitlab@master 2019-10-22 00:06:05 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Filipa Lacerda 48b98b5898 Enables Run Pipeline button to be rendered
In the Merge Request view, under pipelines tab
the user can see a run pipeline button

Adds axios post request to button click

Adds the logic to handle the user click,
refresh the table and disable the button while thee
request is being made

Updates UI for desktop and mobile

Adds specs
Regenerates potfile

Follow-up after review

Uses .finally to avoid code repetition
2019-09-11 09:06:33 +00:00
Nick Thomas 381468d0cc
Allow asynchronous rebase operations to be monitored
This MR introduces tracking of the `rebase_jid` for merge requests. As
with `merge_ongoing?`, `rebase_in_progress?` will now return true if a
rebase is proceeding in sidekiq.

After one release, we should remove the Gitaly-based lookup of rebases.
It is much better to track this kind of thing via the database.
2019-07-04 08:50:55 +01:00
Marin Jankovski f66169b35c Merge branch 'security-59581-related-merge-requests-count' into 'master'
Expose merge requests count based on user access

See merge request gitlab/gitlabhq!3157
2019-07-02 06:19:58 +00:00
Oswaldo Ferreira 3af348b6cf Automatically update MR merge-ref along merge status
This couples the code that transitions the `MergeRequest#merge_status`
and refs/merge-requests/:iid/merge ref update.

In general, instead of directly telling `MergeToRefService` to update
the merge ref, we should rely on `MergeabilityCheckService` to keep
both the merge status and merge ref synced. Now, if the merge_status is
`can_be_merged` it means the merge-ref is also updated to the latest.

We've also updated the logic to be more systematic and less user-based.
2019-06-20 11:48:30 -03:00
Alexandru Croitor 09163e423a Expose merge requests count based on user access
Count issues related merge requests based on user access level. And
issue can have related MRs from projects where user does not have
access so the number of related merge requests should be adjusted
based on user's ability to access the related MRs.

https://gitlab.com/gitlab-org/gitlab-ce/issues/59581
2019-06-18 12:46:46 +03:00
Oswaldo Ferreira 00a273d3a9 Revert "Automatically update MR merge-ref along merge status" 2019-06-11 13:08:25 -03:00
Douwe Maan 96ff9c6bd8 Merge branch 'osw-sync-merge-ref-upon-mergeability-check' into 'master'
Automatically update MR merge-ref along merge status

Closes #58495

See merge request gitlab-org/gitlab-ce!28513
2019-06-03 16:29:41 +00:00
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
Oswaldo Ferreira 4246a62118 Add payload to the service response
This introduces payload to the ServiceResponse with
the merge ref HEAD commit data
2019-05-31 19:16:01 -03:00
Oswaldo Ferreira 96db70a444 Simplify merge_ref_head methods 2019-05-31 19:16:01 -03:00
Oswaldo Ferreira b965009ddd Automatically update MR merge-ref along merge status
This couples the code that transitions the `MergeRequest#merge_status`
and refs/merge-requests/:iid/merge ref update.

In general, instead of directly telling `MergeToRefService` to update
the merge ref, we should rely on `MergeabilityCheckService` to keep
both the merge status and merge ref synced. Now, if the merge_status is
`can_be_merged` it means the merge-ref is also updated to the latest.

We've also updated the logic to be more systematic and less user-based.
2019-05-31 19:16:01 -03: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