Unverified Commit a3b0acb3 authored by Jonah Brüchert's avatar Jonah Brüchert
Browse files

Warn when creating merge requests from master

parent 67267a8d
......@@ -82,6 +82,14 @@ class MergeRequestCreator(RepositoryConnection):
"""
Run some sanity checks and warn the user if necessary
"""
if self._local_repo.active_branch.name == "master":
Utils.log(
LogType.Warning,
"Creating merge requests from master is a bad idea.",
"Please check out a new a branch before creating a merge request.",
"To cancel, please press Ctrl + C.",
)
if (
not self._local_repo.active_branch.name.startswith("work/")
and not self.__fork
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment