-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
import requests | ||
from requests.exceptions import SSLError, RequestException | ||
|
||
# List of URLs to check | ||
urls = [ | ||
"https://adafruit.github.io/arduino-board-index/package_adafruit_index.json", | ||
"http://arduino.esp8266.com/stable/package_esp8266com_index.json", | ||
"https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json", | ||
"https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json", | ||
"https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json", | ||
"http://drazzy.com/package_drazzy.com_index.json", | ||
"http://drazzy.good-enough.cloud/package_drazzy.com_index.json" | ||
] | ||
|
||
def check_url(url): | ||
try: | ||
# Attempt to request URL with SSL verification | ||
response = requests.get(url) | ||
response.raise_for_status() # Raise an error for bad status codes | ||
print(f"URL accessible: {url}") | ||
except SSLError as ssl_error: | ||
print(f"URL failed with SSL error: {url}, Error: {ssl_error}, retrying without SSL verification...") | ||
# Retry without SSL verification if an SSL error occurs | ||
try: | ||
response = requests.get(url, verify=False) | ||
response.raise_for_status() | ||
print(f"URL accessible (without SSL verification): {url}") | ||
except RequestException as e: | ||
print(f"URL still failed after disabling SSL verification: {url}, Error: {e}") | ||
except RequestException as e: | ||
# Handle other errors | ||
print(f"URL failed: {url}, Error: {e}") | ||
|
||
for url in urls: | ||
check_url(url) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
repo_topics=$(curl -f --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" || echo '{"topics":[]}') | ||
repo_topics=$(echo $repo_topics | jq -r '.topics[]' ) | ||
echo $repo_topics |