diff --git a/src/git_flow/command/merge.py b/src/git_flow/command/merge.py index 1599001..347df02 100644 --- a/src/git_flow/command/merge.py +++ b/src/git_flow/command/merge.py @@ -111,6 +111,7 @@ def create_pull_request(token: str, branch: str, target: str): target, title, changelog.generate_content(target, branch), + branch not in environments ) success(message) diff --git a/src/git_flow/remote/base.py b/src/git_flow/remote/base.py index 24950fd..1fce6bf 100644 --- a/src/git_flow/remote/base.py +++ b/src/git_flow/remote/base.py @@ -56,6 +56,7 @@ class RemoteAPI(ABC): destination: str, title: str | None = None, description: str | None = None, + close_source_branch: bool = True ) -> str: pass diff --git a/src/git_flow/remote/bitbucket.py b/src/git_flow/remote/bitbucket.py index 8874c10..b329433 100644 --- a/src/git_flow/remote/bitbucket.py +++ b/src/git_flow/remote/bitbucket.py @@ -12,6 +12,7 @@ class BitbucketRemoteAPI(RemoteAPI): destination: str, title: str | None = None, description: str | None = None, + close_source_branch: bool = True ): request = requests.post( self.get_endpoint("/pullrequests"), @@ -21,7 +22,7 @@ class BitbucketRemoteAPI(RemoteAPI): "description": description, "source": {"branch": {"name": source}}, "destination": {"branch": {"name": destination}}, - "close_source_branch": True, + "close_source_branch": close_source_branch, }, ) diff --git a/src/git_flow/remote/github.py b/src/git_flow/remote/github.py index f46a5cc..84e00ef 100644 --- a/src/git_flow/remote/github.py +++ b/src/git_flow/remote/github.py @@ -11,6 +11,7 @@ class GithubRemoteAPI(RemoteAPI): destination: str, title: str | None = None, description: str | None = None, + close_source_branch: bool = True ) -> str: raise GitFlowError("not implemented yet!")