How to use the nbgitpuller.pull.GitPuller.pull function in nbgitpuller

To help you get started, we’ve selected a few nbgitpuller examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterhub / nbgitpuller / nbgitpuller / pull.py View on Github external
def main():
    """
    Synchronizes a github repository with a local repository.
    """
    logging.basicConfig(
        format='[%(asctime)s] %(levelname)s -- %(message)s',
        level=logging.DEBUG)

    parser = argparse.ArgumentParser(description='Synchronizes a github repository with a local repository.')
    parser.add_argument('git_url', help='Url of the repo to sync')
    parser.add_argument('branch_name', default='master', help='Branch of repo to sync', nargs='?')
    parser.add_argument('repo_dir', default='.', help='Path to clone repo under', nargs='?')
    args = parser.parse_args()

    for line in GitPuller(
        args.git_url,
        args.branch_name,
        args.repo_dir
    ).pull():
        print(line)

nbgitpuller

Jupyter Extension to do one-way synchronization of git repositories

BSD-3-Clause
Latest version published 1 month ago

Package Health Score

78 / 100
Full package analysis

Similar packages