Terms Of Use

Privacy Policy

Featured snippets are MIT license

Gears & Masters

DevOpsnipp.com © 2020

medium.png

Add collaborator to repository

Add collaborator to Github repository

0

Votes

USERNAME = "PUT_HERE_USERNAME"
ACCESS_TOKEN = "PUT_HERE_TOKEN" # generate token here: https://github.com/settings/tokens
g = Github(base_url="https://api.github.com", login_or_token=ACCESS_TOKEN)
repo = g.get_repo("PyGithub/PyGithub")
repo.add_to_collaborators(USERNAME,permission="push")

Vote Here

You must earn at least 1 vote on your snippets to be allowed to vote