Apply a suggestion to a merge request
PUT
/api/v4/suggestions/{id}/apply
Applies a suggested patch in a merge request. You must have the Developer, Maintainer, or Owner role.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
The ID of the suggestion
Request Body
Section titled “Request Body”Media typeapplication/json
object
commit_message
A custom commit message to use instead of the default generated message or the project’s default message
string
Examplegenerated
{ "commit_message": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
id
integer format: int64
from_line
integer
to_line
integer
appliable
boolean
applied
boolean
from_content
string
to_content
string
Example
{ "id": 1, "from_line": 1, "to_line": 1, "appliable": true, "applied": false, "from_content": "Original content\n", "to_content": "New content\n"}Bad Request
Not Found