Skip to content

Commit 476ad50

Browse files
committed
create and start coding the script
1 parent 109d3b0 commit 476ad50

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

script.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from github import Github
2+
3+
# Replace with your GitHub access token
4+
ACCESS_TOKEN = 'XXXXXXXXXXXXXXX'
5+
6+
# Create a GitHub instance using the access token
7+
g = Github(ACCESS_TOKEN)
8+
9+
# Replace with your repository name and owner
10+
repository_owner = "BaseMax"
11+
repository_name = "get-github-issues"
12+
13+
# Get the repository object
14+
repo = g.get_repo(f"{repository_owner}/{repository_name}")
15+
print(repo)
16+
17+
# Get all the issues in the repository with the "auto-release" label
18+
issues = repo.get_issues(labels=["test-label"], state='open')
19+
20+
# Loop through each issue and get its comments
21+
for issue in issues:
22+
print(f"Issue: {issue.title}")
23+
for comment in issue.get_comments():
24+
print(f"\tComment: {comment.body}")

0 commit comments

Comments
 (0)