Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitlab: close Merge Requests instead of deleting them #229

Closed
tmeijn opened this issue Feb 4, 2022 · 1 comment · Fixed by #230
Closed

Gitlab: close Merge Requests instead of deleting them #229

tmeijn opened this issue Feb 4, 2022 · 1 comment · Fixed by #230
Labels
bug Something isn't working

Comments

@tmeijn
Copy link
Contributor

tmeijn commented Feb 4, 2022

Describe the bug
Currently when Multi-Gitter is called with the close command, the GitLab implementation actually deletes the Merge Request instead of closing it. This results in the Merge Request not being able to be found anymore. Furthermore, this requires admin or owner level privileges, which is not necessarily required for Multi-Gitter to work.

Expected behavior
Instead of deleting, the Merge Request should be closed

Additional context
The function that should close the Merge Request actually calls the DeleteMergeRequest, which calls the DELETE method on the api

_, err := g.glClient.MergeRequests.DeleteMergeRequest(pr.targetPID, pr.iid, gitlab.WithContext(ctx))

Instead the Merge Request should be updated with the state_event: close

@tmeijn tmeijn added the bug Something isn't working label Feb 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2022

Included in release v0.39.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant