Skip to content

Commit 3a2c8cc

Browse files
committed
update script
1 parent 9510fa7 commit 3a2c8cc

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

script.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import os
2+
import re
13
from github import Github
24
from dotenv import load_dotenv
3-
import os
45

56
load_dotenv()
67

@@ -16,16 +17,20 @@
1617
labels = ["test-label"]
1718
state = "open"
1819

19-
2020
# Get the repository object
2121
repo = g.get_repo(f"{repository_owner}/{repository_name}")
2222
print(repo)
2323

2424
# Get all the issues in the repository with the "auto-release" label
25-
issues = repo.get_issues(labels=labels, state=state)
25+
issues = repo.get_issues(labels=labels, state=state, sort='updated')
2626

2727
# Loop through each issue and get its comments
2828
for issue in issues:
2929
print(f"Issue: {issue.title}")
30-
for comment in issue.get_comments():
30+
print("body: <<<", issue.body, ">>>")
31+
32+
comments = list(issue.get_comments()).reverse()
33+
for comment in comments:
3134
print(f"\tComment: {comment.body}")
35+
36+
print("\n\n")

0 commit comments

Comments
 (0)