From 14bdbfc234b5e274c10496880ddb130a5948205c Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 26 Nov 2024 13:04:28 +0100 Subject: [PATCH 1/2] Use origin_branch in case fork is not enabled Signed-off-by: Petr "Stone" Hracek --- .github/workflows/build-and-push.yml | 2 +- Dockerfile | 2 +- betka/gitlab.py | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index f4533c8..0b2e911 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -20,7 +20,7 @@ jobs: with: dockerfiles: ./Dockerfile image: betka - tags: latest 1 ${{ github.sha }} 0.9.7 + tags: latest 1 ${{ github.sha }} 0.9.8 - name: Push betka image to Quay.io id: push-to-quay diff --git a/Dockerfile b/Dockerfile index 9612b5c..b9e4ba4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM quay.io/fedora/fedora:37 ENV NAME=betka-fedora \ - RELEASE=0.9.7 \ + RELEASE=0.9.8 \ ARCH=x86_64 \ SUMMARY="Syncs changes from upstream repository to downstream" \ DESCRIPTION="Syncs changes from upstream repository to downstream" \ diff --git a/betka/gitlab.py b/betka/gitlab.py index 388e5e6..ea53855 100644 --- a/betka/gitlab.py +++ b/betka/gitlab.py @@ -403,7 +403,7 @@ def create_gitlab_merge_request( "description": desc_msg, "target_project_id": self.project_id, } - if not self.betka_config["use_gitlab_forks"]: + if not self.is_fork_enabled(): data["target_branch"] = origin_branch return self.create_project_mergerequest(data) diff --git a/setup.py b/setup.py index 7bb5936..6cc09ec 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ def get_requirements(): setup( name="betka", - version="0.9.7", + version="0.9.8", packages=find_packages(exclude=["examples", "tests"]), url="https://github.com/sclorg/betka", license="GPLv3+", From 579572d7d3e0e56d5a2343e7de661251f5d7d3be Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 26 Nov 2024 13:05:27 +0100 Subject: [PATCH 2/2] Add debug info if fork is enabled Signed-off-by: Petr "Stone" Hracek --- betka/gitlab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/betka/gitlab.py b/betka/gitlab.py index ea53855..7ba3760 100644 --- a/betka/gitlab.py +++ b/betka/gitlab.py @@ -395,7 +395,7 @@ def create_gitlab_merge_request( :param branch: ? :return: """ - logger.debug(f"create_gitlab_merge_pull_request(): {branch}") + logger.debug(f"create_gitlab_merge_pull_request(): {branch}. Is fork enabled? {self.is_fork_enabled()}") data = { "title": title, "target_branch": branch,