def cli(ctx, target, path, **kwds): """Short-cut to quickly clone, fork, and branch a relevant Github repo. For instance, the following will clone, fork, and branch the tools-iuc repository to allow a subsequent pull request to fix a problem with bwa. \b $ planemo clone --branch bwa-fix tools-iuc $ cd tools-iuc $ # Make changes. $ git add -p # Add desired changes. $ git commit -m "Fix bwa problem." $ planemo pull_request -m "Fix bwa problem." These changes do require that a github access token is specified in ~/.planemo.yml. An access token can be generated by going to https://github.com/settings/tokens. """ if target in CLONE_GITHUB_TARGETS: target = "https://github.com/%s" % CLONE_GITHUB_TARGETS[target] # Pretty hacky that this path isn't treated as None. if path is None or path.endswith("__NONE__"): path = target.split("/")[-1] github_util.clone_fork_branch(ctx, target, path, **kwds)
def __init__(self, ctx, **kwds): output_directory = kwds["output_directory"] pr_titles = [] target_repository = None do_pull_request = kwds.get("pull_request", True) if output_directory is None: target_repository = os.path.join(ctx.workspace, REGISTERY_TARGET_NAME) output_directory = os.path.join(target_repository, REGISTERY_TARGET_PATH) clone_fork_branch( ctx, "https://github.com/%s" % REGISTERY_REPOSITORY, target_repository, fork=do_pull_request, ) pr_titles = [pr.title for pr in open_prs(ctx)] self.do_pull_request = do_pull_request self.pr_titles = pr_titles self.output_directory = output_directory self.target_repository = target_repository
def cli(ctx, target, path, **kwds): """Short-cut to quickly clone, fork, and branch a relevant Github repo. For instance, the following will clone, fork, and branch the tools-iuc repository to allow a subsequent pull request to fix a problem with bwa. :: $ planemo clone --branch bwa-fix tools-iuc $ cd tools-iuc $ # Make changes. $ git add -p # Add desired changes. $ git commit -m "Fix bwa problem." $ planemo pull_request -m "Fix bwa problem." These changes do require that a github username and password are specified in ~/.planemo.yml. """ if target in CLONE_GITHUB_TARGETS: target = "https://github.com/%s" % CLONE_GITHUB_TARGETS[target] # Pretty hacky that this path isn't treated as None. if path is None or path.endswith("__NONE__"): path = target.split("/")[-1] github_util.clone_fork_branch(ctx, target, path, **kwds)