Skip to content

Commit b6b0ad2

Browse files
committed
some changes
1 parent 484e8c0 commit b6b0ad2

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

script.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
from github import Github
2+
from dotenv import load_dotenv
3+
import os
4+
5+
load_dotenv()
26

37
# Replace with your GitHub access token
4-
ACCESS_TOKEN = 'XXXXXXXXXXXXXXX'
8+
ACCESS_TOKEN = os.getenv("ACCESS_TOKEN")
59

610
# Create a GitHub instance using the access token
711
g = Github(ACCESS_TOKEN)
812

913
# Replace with your repository name and owner
1014
repository_owner = "BaseMax"
1115
repository_name = "get-github-issues"
16+
labels = []
17+
state = "open"
18+
1219

1320
# Get the repository object
1421
repo = g.get_repo(f"{repository_owner}/{repository_name}")
1522
print(repo)
1623

1724
# Get all the issues in the repository with the "auto-release" label
18-
issues = repo.get_issues(labels=["test-label"], state='open')
25+
issues = repo.get_issues(labels=labels, state=state)
1926

2027
# Loop through each issue and get its comments
2128
for issue in issues:

0 commit comments

Comments
 (0)