def __init__(self, **config): from pygithub3.services.users import User from pygithub3.services.repos import Repo from pygithub3.services.gists import Gist self._users = User(**config) self._repos = Repo(**config) self._gists = Gist(**config)
def __init__(self, **config): from pygithub3.services.users import User from pygithub3.services.repos import Repo from pygithub3.services.gists import Gist from pygithub3.services.git_data import GitData from pygithub3.services.pull_requests import PullRequests from pygithub3.services.orgs import Org from pygithub3.services.issues import Issue self._users = User(**config) self._repos = Repo(**config) self._gists = Gist(**config) self._git_data = GitData(**config) self._pull_requests = PullRequests(**config) self._orgs = Org(**config) self._issues = Issue(**config)
def handle(self, *args, **options): if len(args) > 0: if args[0] == "create": for pending_repo in GitRepo.objects.filter(is_active=False): repo_name = slugify(pending_repo.project_set.all()[0]) repo_service = Repo(login=GIT_LOGIN, password=GIT_PASSWORD) repo_service.create( dict(name=repo_name, description='desc')) repo = repo_service.get(user="******", repo=repo_name) pending_repo.url = repo.clone_url pending_repo.is_active = True pending_repo.save() else: print("There were no valid arguments") else: print("There were no valid arguments")
from pygithub3.services.repos import Repo ''' cmd = "git shortlog -s -n" os.chdir("C:\Users\DhruvOhri\Documents\COMP 6411\pygithub3-0.3") os.system("git clone https://github.com/poise/python.git") os.chdir("/home/d/d_ohri/Desktop/python") output = commands.getoutput(cmd) print(output) raw_input("press enter to continue") ''' #r = github3.repository('poise', 'python') r = Repo() r1 = r.list_contributors('poise', 'python') for page in r1: for resource in page: print resource
def setUp(self): self.rs = Repo() self.rs.set_user('octocat') self.rs.set_repo('octocat_repo')