File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from 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
711g = Github (ACCESS_TOKEN )
812
913# Replace with your repository name and owner
1014repository_owner = "BaseMax"
1115repository_name = "get-github-issues"
16+ labels = []
17+ state = "open"
18+
1219
1320# Get the repository object
1421repo = g .get_repo (f"{ repository_owner } /{ repository_name } " )
1522print (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
2128for issue in issues :
You can’t perform that action at this time.
0 commit comments