You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I tried to use the automatic merging, when the pipeline succeeds and after that deleting the source branch, I run into problems, as the HTTP request is not allowed.
Even though the methods accept this as a valid paramaeter because of **kwargs, this wouldn't parse the given argument correctly as a query_data (this is the issue in the python-gitlab library itself but will lead after the fix to issues here):
gitlab/v4/objects.py
def merge(
self,
merge_commit_message=None,
should_remove_source_branch=False,
merge_when_pipeline_succeeds=False,
**kwargs
):
path = "%s/%s/merge" % (self.manager.path, self.get_id())
data = {}
if merge_commit_message:
data["merge_commit_message"] = merge_commit_message
if should_remove_source_branch:
data["should_remove_source_branch"] = True
if merge_when_pipeline_succeeds:
data["merge_when_pipeline_succeeds"] = True
server_data = self.manager.gitlab.http_put(path, post_data=data, **kwargs)
self._update_attrs(server_data)
Here the arguments are currently parsed as "post_data", which is simply wrong in the python-gitlab library itself, as I already explained several times. After my pull request there would be accepted though, the argument wouldn't be handled as "should_remove_source_branch", but as a **kwargs, since the naming "remove_source_branch" is simply wrong.
I'll do a pull request if you would allow me to do so, as I already fixed that locally.
The text was updated successfully, but these errors were encountered:
When I tried to use the automatic merging, when the pipeline succeeds and after that deleting the source branch, I run into problems, as the HTTP request is not allowed.
This issue relates to the library itself and I also already created an issue there https://github.com/python-gitlab/python-gitlab/issues/1120.
Nevertheless the problem would still remain here partly, when using the argument to remove the branch after a successful merge.
This is because the method references the wrong parameter for the option to remove the source branch afterwards, as you see here:
Even though the methods accept this as a valid paramaeter because of **kwargs, this wouldn't parse the given argument correctly as a query_data (this is the issue in the python-gitlab library itself but will lead after the fix to issues here):
Here the arguments are currently parsed as "post_data", which is simply wrong in the python-gitlab library itself, as I already explained several times. After my pull request there would be accepted though, the argument wouldn't be handled as "should_remove_source_branch", but as a **kwargs, since the naming "remove_source_branch" is simply wrong.
I'll do a pull request if you would allow me to do so, as I already fixed that locally.
The text was updated successfully, but these errors were encountered: