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 merge request should enable "Delete source branch" option by default #190

Open
bittner opened this issue Aug 14, 2020 · 3 comments
Open

Comments

@bittner
Copy link
Contributor

bittner commented Aug 14, 2020

Currently, when a merge request is created on GitLab using the --pr option, the checkbox "Delete source branch" remains unchecked. It looks like that GitLab doesn't automatically consider the related default in the GitLab repo project's merge request settings.

We should set that option by default, optionally making it configurable.

Optionally, it could be investigated whether a similar option exists for GitHub in the meantime (probably not), which would help to keep the feature set aligned across GitHub and GitLab. (We probably want to avoid "GitLab-only" command line switches.)

@bastelfreak
Copy link
Member

as far as I know you cannot set this on GitHub for a single pull request. On GitHub we've got one setting for the whole repository to delete merged branches ( which we've enabled):

2020-08-15-195909_952x125_scrot

I think in the past we had the create a pr option in modulesync only for github, not for gitlab. I am not against options that are gitlab specific, as far as it's properly documented (but others might see this differently).

@bittner
Copy link
Contributor Author

bittner commented Aug 16, 2020

It may make sense to not make this configurable, and simply implement "the expected default behavior".

(Note that this behavior is configurable via the GitLab project settings since recently. So, well, what's the default? Though, GitLab's "Delete source branch" option is so common that, at least currently, it's somewhat "an accepted default". Not sure if someone would object here. And, as a side note, it may be a GitLab API bug that the project default value is not considered in the API call, when the value is unspecified; maybe this will get fixed by GitLab in future.)

Also, ModuleSync will likely always create a new branch, which deserves being removed after being merged. IOW, why should someone want to keep a merged branch that was created by a bot (or human automation)?

@saz
Copy link

saz commented Oct 7, 2022

There's an issue open to respect the configured value https://gitlab.com/gitlab-org/gitlab/-/issues/231245

Would be great to have an option to configure that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants