Commit a38d9e77 authored by Evan Read's avatar Evan Read

Merge branch 'docs-33657-add-rails-console-commands-for-deleting-a-merge-request' into 'master'

Docs: Add commands to delete a merge request

Closes #33657

See merge request gitlab-org/gitlab!18291
parents ba44545a 4af9566d
...@@ -688,6 +688,15 @@ u = User.find_by_username('') ...@@ -688,6 +688,15 @@ u = User.find_by_username('')
MergeRequests::PostMergeService.new(p, u).execute(m) MergeRequests::PostMergeService.new(p, u).execute(m)
``` ```
### Delete a merge request
```ruby
u = User.find_by_username('<username>')
p = Project.find_by_full_path('<group>/<project>')
m = p.merge_requests.find_by(iid: <IID>)
Issuable::DestroyService.new(m.project, u).execute(m)
```
### Rebase manually ### Rebase manually
```ruby ```ruby
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment