Exemplo n.º 1
0
 def refresh_repositories(self, msg, args):
     config = RepoConfig(REPOSITORY_CONFIG_FILE)
     branches = config.get_repository(REPOSITORY_NAME)["branches"]
     for branch in branches:
         cmd = GitCommand(branch["path"])
         cmd.pull()
         yield ("{} had been updated.".format((branch["path"])))
Exemplo n.º 2
0
def code_repository_name():
    repo_config = RepoConfig(REPOSITORY_CONFIG_FILE)
    repo_obj = repo_config.get_repository(REPOSITORY_NAME)
    repo_owner = repo_obj["github"]["code"]["owner"]
    repo_name = repo_obj["github"]["code"]["repository"]
    return "{}/{}".format(repo_owner, repo_name)