Coverage for gitlab_cloner/gitlab_api.py : 79%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""LICENSE Copyright 2017 Hermann Krumrey <hermann@krumreyh.com>
This file is part of gitlab-cloner.
gitlab-cloner is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
gitlab-cloner is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with gitlab-cloner. If not, see <http://www.gnu.org/licenses/>. LICENSE"""
-> List[Dict[str, Any]]: """ Retrieves a list of repositories that the provided private token grants access to. :param gitlab_url: The URL of the gitlab instance, including https etc. :param private_token: The private token to use :return: A list of gitlab projects """
""" Clones a git repository. If the repository already exists, the user will be prompted to delete the old repository. If the user refuses, the repository will not be cloned. :param repo: The repository to clone :param private_token: The private token to use when cloning :return: None """
resp = input("Repository " + repo["name"] + "exists. Delete? (y|n)") if resp == "y": shutil.rmtree(repo["name"]) else: return
.replace("http://", "http://" + oauth)\ .replace("https://", "https://" + oauth)
|