mirror of
https://seed.radicle.dev/rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE.git
synced 2026-11-12 14:40:43 +08:00
refactor: add helper method to get repository rid and head commit
Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
+6
-5
@@ -68,16 +68,17 @@ class Suite:
|
||||
git.write(".radicle/native.yaml", native.yaml())
|
||||
git.commit("add native.yaml")
|
||||
|
||||
def _setup(self, repo_name, shell):
|
||||
git = self._create_git_repo(repo_name)
|
||||
self._create_valid_native_yaml(git, shell)
|
||||
|
||||
def _get_repo_info(self, git):
|
||||
commit = git.head()
|
||||
self.rad.init(git)
|
||||
rid = self.rad.rid(git)
|
||||
|
||||
return rid, commit
|
||||
|
||||
def _setup(self, repo_name, shell):
|
||||
git = self._create_git_repo(repo_name)
|
||||
self._create_valid_native_yaml(git, shell)
|
||||
return self._get_repo_info(git)
|
||||
|
||||
def _ci(self):
|
||||
return NativeCI(self.rad, self.config)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user