We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 109d3b0 commit 476ad50Copy full SHA for 476ad50
1 file changed
script.py
@@ -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