This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_get_request(route, host, user_agent): | |
return f"GET {route} HTTP/1.1\r\nHost: {host}\r\nUser-Agent: {user_agent}\r\n\r\n" | |
with open("http_request", "w") as http_request_file: | |
http_request_file.write(create_get_request( | |
"/points/39.7456,-97.0892", | |
"api.weather.gov", | |
"test-agent" | |
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
purge_before_date="2022-01-01" | |
labels_to_remove=("priority/high", "priority/medium") | |
for label in "${labels_to_remove[@]}"; do | |
echo "Removing ${label} labels:" | |
echo "" | |
issues_json=$(gh issue list -S "is:open is:issue label:${label} created:<${purge_before_date}" --limit 200 --json number,title) |