Skip to content

Commit c77a66d

Browse files
committed
WIP: revert
1 parent 131d107 commit c77a66d

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

board-url-test.py

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
import requests
3+
from requests.exceptions import SSLError, RequestException
4+
5+
# List of URLs to check
6+
urls = [
7+
"https://adafruit.github.io/arduino-board-index/package_adafruit_index.json",
8+
"http://arduino.esp8266.com/stable/package_esp8266com_index.json",
9+
"https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json",
10+
"https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json",
11+
"https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json",
12+
"http://drazzy.com/package_drazzy.com_index.json",
13+
"http://drazzy.good-enough.cloud/package_drazzy.com_index.json"
14+
]
15+
16+
def check_url(url):
17+
try:
18+
# Attempt to request URL with SSL verification
19+
response = requests.get(url)
20+
response.raise_for_status() # Raise an error for bad status codes
21+
print(f"URL accessible: {url}")
22+
except SSLError as ssl_error:
23+
print(f"URL failed with SSL error: {url}, Error: {ssl_error}, retrying without SSL verification...")
24+
# Retry without SSL verification if an SSL error occurs
25+
try:
26+
response = requests.get(url, verify=False)
27+
response.raise_for_status()
28+
print(f"URL accessible (without SSL verification): {url}")
29+
except RequestException as e:
30+
print(f"URL still failed after disabling SSL verification: {url}, Error: {e}")
31+
except RequestException as e:
32+
# Handle other errors
33+
print(f"URL failed: {url}, Error: {e}")
34+
35+
for url in urls:
36+
check_url(url)

quick_test.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
repo_topics=$(curl -f --request GET --url "https://api.github.com/repos/$GITHUB_REPOSITORY" || echo '{"topics":[]}')
2+
repo_topics=$(echo $repo_topics | jq -r '.topics[]' )
3+
echo $repo_topics

0 commit comments

Comments
 (0)