Sandcastle object is pass into PackitAPI over constructor
@@ -55,10 +55,12 @@ class PackitAPI:
config: Config,
package_config: PackageConfig,
upstream_local_project: LocalProject,
+ sandcastle=None,
) -> None:
self.config = config
self.package_config = package_config
self.upstream_local_project = upstream_local_project
+ self.sandcastle = sandcastle
self._up = None
self._dg = None
@@ -70,6 +72,7 @@ class PackitAPI:
config=self.config,
package_config=self.package_config,
local_project=self.upstream_local_project,
+ sandcastle_object=self.sandcastle,
)
return self._up
@@ -79,20 +82,12 @@ class PackitAPI:
self._dg = DistGit(config=self.config, package_config=self.package_config)
return self._dg
- def sync_pr(
- self,
- pr_id,
- dist_git_branch: str,
- upstream_version: str = None,
- openshift_deployer=None,
- ):
+ def sync_pr(self, pr_id, dist_git_branch: str, upstream_version: str = None):
assert_existence(self.dg.local_project)
# do not add anything between distgit clone and saving gpg keys!
self.up.allowed_gpg_keys = self.dg.get_allowed_gpg_keys_from_downstream_config()
- self.up.run_action(
- action=ActionName.pre_sync, openshift_deployer=openshift_deployer
- )
+ self.up.run_action(action=ActionName.pre_sync)
self.up.checkout_pr(pr_id=pr_id)
self.dg.check_last_commit()
@@ -145,7 +140,6 @@ class PackitAPI:
version: str = None,
force_new_sources=False,
upstream_ref: str = None,
- openshift_deployer=None,
):
"""
Update given package in Fedora
@@ -158,9 +152,7 @@ class PackitAPI:
upstream_ref = upstream_ref or self.package_config.upstream_ref
- self.up.run_action(
- action=ActionName.post_upstream_clone, openshift_deployer=openshift_deployer
- )
+ self.up.run_action(action=ActionName.post_upstream_clone)
full_version = version or self.up.get_version()
if not full_version:
@@ -179,9 +171,7 @@ class PackitAPI:
self.dg.check_last_commit()
- self.up.run_action(
- action=ActionName.pre_sync, openshift_deployer=openshift_deployer
- )
+ self.up.run_action(action=ActionName.pre_sync)
local_pr_branch = f"{full_version}-{dist_git_branch}-update"
# fetch and reset --hard upstream/$branch?
