Add mutation to accept merge requests
What does this MR do?
This adds a GraphQL mutation to accept merge requests.
See:
Example queries
mutation {
mergeRequestAccept(input: { projectPath: "gitlab-org/gitlab", iid: "54758", strategy: "MERGE_TRAIN", sha: "deadbeef" }) {
errors
mergeRequest { status }
}
}
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
This exposes a feature via HTTP APIs that is currently only available via controller actions. That makes it more available for abuse. This is only available to logged in users with maintainer permissions, so this risk is minimal.
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Security
This adds a new policy rule, which replicates the logic found in the controller and API resources. This is not a change in authorization.
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
Edited by Alex Kalderimis