ultralytics-actions 0.0.47__py3-none-any.whl → 0.0.48__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- actions/__init__.py +1 -1
- actions/utils/common_utils.py +13 -4
- {ultralytics_actions-0.0.47.dist-info → ultralytics_actions-0.0.48.dist-info}/METADATA +1 -1
- {ultralytics_actions-0.0.47.dist-info → ultralytics_actions-0.0.48.dist-info}/RECORD +8 -8
- {ultralytics_actions-0.0.47.dist-info → ultralytics_actions-0.0.48.dist-info}/LICENSE +0 -0
- {ultralytics_actions-0.0.47.dist-info → ultralytics_actions-0.0.48.dist-info}/WHEEL +0 -0
- {ultralytics_actions-0.0.47.dist-info → ultralytics_actions-0.0.48.dist-info}/entry_points.txt +0 -0
- {ultralytics_actions-0.0.47.dist-info → ultralytics_actions-0.0.48.dist-info}/top_level.txt +0 -0
actions/__init__.py
CHANGED
actions/utils/common_utils.py
CHANGED
@@ -22,7 +22,18 @@ REQUESTS_HEADERS = {
|
|
22
22
|
"Referer": "https://www.google.com/",
|
23
23
|
"Origin": "https://www.google.com/",
|
24
24
|
}
|
25
|
-
|
25
|
+
BAD_HTTP_CODES = frozenset(
|
26
|
+
{
|
27
|
+
# 403, # Forbidden - client lacks permission to access the resource (commented as works in browser typically)
|
28
|
+
404, # Not Found - requested resource doesn't exist
|
29
|
+
405, # Method Not Allowed - HTTP method not supported for this endpoint
|
30
|
+
410, # Gone - resource permanently removed
|
31
|
+
500, # Internal Server Error - server encountered an error
|
32
|
+
502, # Bad Gateway - upstream server sent invalid response
|
33
|
+
503, # Service Unavailable - server temporarily unable to handle request
|
34
|
+
504, # Gateway Timeout - upstream server didn't respond in time
|
35
|
+
}
|
36
|
+
)
|
26
37
|
URL_IGNORE_LIST = frozenset(
|
27
38
|
{
|
28
39
|
"localhost",
|
@@ -44,7 +55,6 @@ URL_IGNORE_LIST = frozenset(
|
|
44
55
|
"storage.googleapis.com", # private GCS buckets
|
45
56
|
}
|
46
57
|
)
|
47
|
-
|
48
58
|
URL_PATTERN = re.compile(
|
49
59
|
r"\[([^]]+)]\(([^)]+)\)" # Matches Markdown links [text](url)
|
50
60
|
r"|"
|
@@ -85,7 +95,6 @@ def is_url(url, session=None, check=True, max_attempts=3, timeout=2):
|
|
85
95
|
|
86
96
|
if check:
|
87
97
|
requester = session or requests
|
88
|
-
bad_codes = {404, 410, 500, 502, 503, 504}
|
89
98
|
kwargs = {"timeout": timeout, "allow_redirects": True}
|
90
99
|
if not session:
|
91
100
|
kwargs["headers"] = REQUESTS_HEADERS
|
@@ -94,7 +103,7 @@ def is_url(url, session=None, check=True, max_attempts=3, timeout=2):
|
|
94
103
|
try:
|
95
104
|
# Try HEAD first, then GET if needed
|
96
105
|
for method in (requester.head, requester.get):
|
97
|
-
if method(url, stream=method == requester.get, **kwargs).status_code not in
|
106
|
+
if method(url, stream=method == requester.get, **kwargs).status_code not in BAD_HTTP_CODES:
|
98
107
|
return True
|
99
108
|
return False
|
100
109
|
except Exception:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.48
|
4
4
|
Summary: Ultralytics Actions for GitHub automation and PR management.
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
@@ -1,15 +1,15 @@
|
|
1
|
-
actions/__init__.py,sha256=
|
1
|
+
actions/__init__.py,sha256=OqYKEDJfchmeCRCnZmLhs3knsOhRPO9LKEQzuaWOgq0,742
|
2
2
|
actions/first_interaction.py,sha256=Oosw3GlXObF4RxYJG8haIjKXSV4MAx_uPXfMdRKY5qA,17851
|
3
3
|
actions/summarize_pr.py,sha256=Pfcm6ArfZfcMme48FcCGNmMwrFFlsG0czifhXHDKAlY,11166
|
4
4
|
actions/summarize_release.py,sha256=2D1IIeS4xrQNEJER3HItm5u9XvTL8hwGX_jWD2S8q1Y,8455
|
5
5
|
actions/update_markdown_code_blocks.py,sha256=DN6rrDw2VHXUTetrrg1SHlYDco9iaGOfQBKFORqbCBI,6362
|
6
6
|
actions/utils/__init__.py,sha256=WStdEAYROVnF0nubEOmrFLrejkRiMXIefA5O1ckfcFs,476
|
7
|
-
actions/utils/common_utils.py,sha256=
|
7
|
+
actions/utils/common_utils.py,sha256=o2dMSS7TxpwJLU58ybcZFgtaV-PM5lzQRP0B9cW-bBc,5420
|
8
8
|
actions/utils/github_utils.py,sha256=0h0Hz2tgUta61Ymn9YggRXBZ7aZdF5krKnX7Tj9jqRU,7068
|
9
9
|
actions/utils/openai_utils.py,sha256=U7DjxTdFGdhmWSE4_KIg1yPQdtrfG4GkbNZCgMw4_1Q,1822
|
10
|
-
ultralytics_actions-0.0.
|
11
|
-
ultralytics_actions-0.0.
|
12
|
-
ultralytics_actions-0.0.
|
13
|
-
ultralytics_actions-0.0.
|
14
|
-
ultralytics_actions-0.0.
|
15
|
-
ultralytics_actions-0.0.
|
10
|
+
ultralytics_actions-0.0.48.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
11
|
+
ultralytics_actions-0.0.48.dist-info/METADATA,sha256=bQqAndEfjcyjmYcRB73ybeISLirURmF2ZLxRK_uYv5s,10561
|
12
|
+
ultralytics_actions-0.0.48.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
13
|
+
ultralytics_actions-0.0.48.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
|
14
|
+
ultralytics_actions-0.0.48.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
|
15
|
+
ultralytics_actions-0.0.48.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.47.dist-info → ultralytics_actions-0.0.48.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|