Skip to content

Commit

Permalink
leverage token to print all repos
Browse files Browse the repository at this point in the history
  • Loading branch information
Satvik Nema committed May 21, 2024
1 parent 6a4b7a9 commit 8b6b082
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/my_file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import os
from github import Github
from github import Auth

for key in os.environ.keys():
print(f'{key} -> {os.environ[key]}')
auth = Auth.Token(os.environ['GITHUB_TOKEN'])
g = Github(auth=auth)

for repo in g.get_user().get_repos():
print(repo.name)

g.close()

0 comments on commit 8b6b082

Please sign in to comment.