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,40 @@
|
||||
import os
|
||||
import requests
|
||||
import sys
|
||||
|
||||
def close_issues():
|
||||
token = os.environ.get("GITHUB_TOKEN")
|
||||
if not token:
|
||||
print("Error: GITHUB_TOKEN environment variable not set.", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
headers = {
|
||||
"Authorization": f"token {token}",
|
||||
"Accept": "application/vnd.github.v3+json"
|
||||
}
|
||||
|
||||
# We want to close issues 34 to 61 inclusive
|
||||
for issue_number in range(34, 62):
|
||||
url = f"https://api.github.com/repos/mrhavens/becomingone/issues/{issue_number}"
|
||||
|
||||
# First add a comment
|
||||
comment_url = f"{url}/comments"
|
||||
comment_data = {
|
||||
"body": "Sovereign Audit fixes merged into master (Iter 6). The fractures are mathematically mended for POSTERITY."
|
||||
}
|
||||
requests.post(comment_url, headers=headers, json=comment_data)
|
||||
|
||||
# Then close the issue
|
||||
data = {
|
||||
"state": "closed"
|
||||
}
|
||||
response = requests.patch(url, headers=headers, json=data)
|
||||
|
||||
if response.status_code == 200:
|
||||
print(f"Successfully closed issue #{issue_number}")
|
||||
else:
|
||||
print(f"Failed to close issue #{issue_number}. Status: {response.status_code}")
|
||||
print(response.text)
|
||||
|
||||
if __name__ == "__main__":
|
||||
close_issues()
|
||||
Reference in new issue
Block a user