Skip to content

Commit

Permalink
add update_github_repo
Browse files Browse the repository at this point in the history
  • Loading branch information
eroux committed Aug 20, 2022
1 parent 51aba67 commit f1c68cd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion openpecha/github_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@ def get_github_repo(repo_name, org_name, token):

def create_github_repo(path, org_name, token, private=False):
org = _get_openpecha_data_org(org_name, token)
repo = org.create_repo(path.name, private)
visibility = "private" if private else "public"
repo = org.create_repo(path.name, private=private, visibility=visibility, has_wiki=False, has_projects=False)
time.sleep(2)
return repo._html_url.value


def update_github_repo(repo_name, org_name, token, private=False):
org = _get_openpecha_data_org(org_name, token)
repo = org.get_repo(repo_name)
repo.edit(private=private)


def commit(repo_path, message, not_includes, branch="master"):
if isinstance(repo_path, Repo):
repo = repo_path
Expand Down

0 comments on commit f1c68cd

Please sign in to comment.