diff options
| author | John Villalovos <john@sodarock.com> | 2022-10-31 03:24:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-31 10:24:27 +0000 |
| commit | bd82d745c8ea9ff6ff078a4c961a2d6e64a2f63c (patch) | |
| tree | 823e263cad7af8dea77309e8ef69a3c23589e9d9 /docs/gl_objects | |
| parent | 29749660b9ca97dda1e7ad104d79266d5ed24d7b (diff) | |
| download | gitlab-bd82d745c8ea9ff6ff078a4c961a2d6e64a2f63c.tar.gz | |
fix: use POST method and return dict in `cancel_merge_when_pipeline_succeeds()` (#2350)
* Call was incorrectly using a `PUT` method when should have used a
`POST` method.
* Changed return type to a `dict` as GitLab only returns
{'status': 'success'} on success. Since the function didn't work
previously, this should not impact anyone.
* Updated the test fixture `merge_request` to add ability to create
a pipeline.
* Added functional test for `mr.cancel_merge_when_pipeline_succeeds()`
Fixes: #2349
Diffstat (limited to 'docs/gl_objects')
| -rw-r--r-- | docs/gl_objects/merge_requests.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/gl_objects/merge_requests.rst b/docs/gl_objects/merge_requests.rst index 02121dc..fd57e60 100644 --- a/docs/gl_objects/merge_requests.rst +++ b/docs/gl_objects/merge_requests.rst @@ -122,8 +122,14 @@ Accept a MR:: mr.merge() -Cancel a MR when the build succeeds:: +Schedule a MR to merge after the pipeline(s) succeed:: + mr.merge(merge_when_pipeline_succeeds=True) + +Cancel a MR from merging when the pipeline succeeds:: + + # Cancel a MR from being merged that had been previously set to + # 'merge_when_pipeline_succeeds=True' mr.cancel_merge_when_pipeline_succeeds() List commits of a MR:: |
