Spaces:
Running
on
Zero
Running
on
Zero
import os | |
from github_repo import GitHubRepo | |
from uploader import upload_files | |
def main() -> None: | |
"""Creates a new GitHub repository and uploads a set of files to it""" | |
token = os.environ['GITHUB_TOKEN'] | |
repo = GitHubRepo('my-new-repo', 'This is a new repository', False) | |
repo_url = create_repo(token, repo) | |
files = ['file1.txt', 'file2.txt', 'file3.txt'] | |
upload_files(token, repo.name, files) | |
print(f'Repo created: {repo_url}') | |
if __name__ == '__main__': | |
main() |