Skip to content
Snippets Groups Projects
Commit 1ef9007e authored by Tim Jaacks's avatar Tim Jaacks
Browse files

accept_merge_request: explicitly remove source branch

A bug in python-gitlab > 2.7.0 [1] brought this up: In the past we
relied on the merge request's setting, whether the source branch should
be deleted or not after a merge. Since we're using the API's merge
function in a fully automated task, however, the branch should always be
deleted. Add the according argument explicitly.

[1]: https://github.com/python-gitlab/python-gitlab/issues/1750
parent 79e3437d
No related branches found
No related tags found
1 merge request!70accept_merge_request: explicitly remove source branch
Pipeline #8536 passed with stages
in 24 seconds
...@@ -36,7 +36,7 @@ def accept_merge_request(project, mr, rebase=False): ...@@ -36,7 +36,7 @@ def accept_merge_request(project, mr, rebase=False):
# Try to merge the merge request # Try to merge the merge request
try: try:
mr.merge() mr.merge(should_remove_source_branch=True)
if pipeline_pending: if pipeline_pending:
print("") print("")
if mr.state == "merged": if mr.state == "merged":
......
  • Tobias Kahlki @tobias.kahlki

    mentioned in commit ci-images@99e363bc

    By Tim Jaacks on 2021-12-15T12:08:26 (imported from GitLab)

    ·

    mentioned in commit ci-images@99e363bc

    By Tim Jaacks on 2021-12-15T12:08:26 (imported from GitLab)

    Toggle commit list
  • Tobias Kahlki @tobias.kahlki

    mentioned in commit ci-images@99e363bc

    By Tim Jaacks on 2021-12-15T12:08:26 (imported from GitLab)

    ·

    mentioned in commit ci-images@99e363bc

    By Tim Jaacks on 2021-12-15T12:08:26 (imported from GitLab)

    Toggle commit list
  • Tobias Kahlki @tobias.kahlki

    mentioned in merge request ci-images!21 (merged)

    By Tim Jaacks on 2021-12-15T12:09:04 (imported from GitLab)

    ·

    mentioned in merge request ci-images!21 (merged)

    By Tim Jaacks on 2021-12-15T12:09:04 (imported from GitLab)

    Toggle commit list
  • Tobias Kahlki @tobias.kahlki

    mentioned in merge request ci-images!21 (merged)

    By Tim Jaacks on 2021-12-15T12:09:04 (imported from GitLab)

    ·

    mentioned in merge request ci-images!21 (merged)

    By Tim Jaacks on 2021-12-15T12:09:04 (imported from GitLab)

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment