diff --git a/packit/distgit.py b/packit/distgit.py index 6664cc0a7..136e005a4 100644 --- a/packit/distgit.py +++ b/packit/distgit.py @@ -15,6 +15,7 @@ from fedora.client import AuthError from lazy_object_proxy import Proxy from ogr.abstract import PullRequest +from ogr.services.pagure import PagureProject from specfile.utils import NEVR from packit.base_git import PackitRepositoryBase @@ -297,8 +298,8 @@ def push_to_fork( "Unable to create a fork of repository " f"{self.local_project.git_project.full_repo_name}", ) - if sync_acls: - # synchronize ACLs between original repo and fork + if sync_acls and isinstance(self.local_project.git_project, PagureProject): + # synchronize ACLs between original repo and fork for Pagure self.sync_acls(self.local_project.git_project, fork) fork_urls = fork.get_git_urls() self.local_project.git_repo.create_remote( diff --git a/packit/upstream.py b/packit/upstream.py index 556915e18..f94bfee10 100644 --- a/packit/upstream.py +++ b/packit/upstream.py @@ -14,6 +14,7 @@ import git from lazy_object_proxy import Proxy +from ogr.services.pagure import PagureProject from packit.actions import ActionName from packit.base_git import PackitRepositoryBase @@ -154,8 +155,11 @@ def push_to_fork( # ogr is awesome! if you want to fork your own repo, you'll get it! project = self.local_project.git_project.get_fork(create=True) - if sync_acls: - # synchronize ACLs between original repo and fork + if sync_acls and isinstance( + self.local_project.git_project, + PagureProject, + ): + # synchronize ACLs between original repo and fork for Pagure self.sync_acls(self.local_project.git_project, project) fork_username = project.namespace