Phase 4: The Cybernetic Nervous System & Thermodynamic Orchestration
This commit is contained in:
1 parent
4be0958758
commit
e5c6e17140
45 files changed
+4486
-742
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import os
|
||||
import requests
|
||||
import json
|
||||
import sys
|
||||
|
||||
def get_issues(output_file):
|
||||
token = os.environ.get("GITHUB_TOKEN")
|
||||
if not token:
|
||||
print("Error: GITHUB_TOKEN environment variable not set.", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
url = "https://api.github.com/repos/mrhavens/becomingone/issues?state=open&per_page=100"
|
||||
headers = {
|
||||
"Authorization": f"token {token}",
|
||||
"Accept": "application/vnd.github.v3+json"
|
||||
}
|
||||
|
||||
response = requests.get(url, headers=headers)
|
||||
if response.status_code == 200:
|
||||
issues = response.json()
|
||||
with open(output_file, 'w') as f:
|
||||
json.dump(issues, f, indent=2)
|
||||
print(f"Successfully fetched {len(issues)} issues to {output_file}")
|
||||
else:
|
||||
print(f"Failed to fetch issues. Status: {response.status_code}", file=sys.stderr)
|
||||
print(response.text, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python get_issues.py <output_file>", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
get_issues(sys.argv[1])
|
||||
Reference in new issue
Block a user