-1

I am trying to close a merge request using gitlab's update merge request api (update mr) but its not working

I am trying this

curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/4/merge_requests/85?state=closed"

but this is not working, am I missing something?

James Z
  • 12,209
  • 10
  • 24
  • 44
ksb
  • 11
  • 2
  • 2
    What kind of error do you get? What is not working? Is the MR still open after the API? We need a bit more details to avoid that we guess. – KargWare Jan 11 '23 at 17:23

1 Answers1

1

Given below is the correct way to close a merge request using GitLab API

curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/4/merge_requests/85?state_event=close"
ksb
  • 11
  • 2