File size: 497 Bytes
185f702
 
 
275b9f3
185f702
 
 
 
 
 
 
 
275b9f3
185f702
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()