ultralytics-actions 0.0.43__py3-none-any.whl → 0.0.44__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/first_interaction.py +3 -3
- actions/utils/common_utils.py +22 -8
- {ultralytics_actions-0.0.43.dist-info → ultralytics_actions-0.0.44.dist-info}/METADATA +1 -1
- {ultralytics_actions-0.0.43.dist-info → ultralytics_actions-0.0.44.dist-info}/RECORD +9 -9
- {ultralytics_actions-0.0.43.dist-info → ultralytics_actions-0.0.44.dist-info}/LICENSE +0 -0
- {ultralytics_actions-0.0.43.dist-info → ultralytics_actions-0.0.44.dist-info}/WHEEL +0 -0
- {ultralytics_actions-0.0.43.dist-info → ultralytics_actions-0.0.44.dist-info}/entry_points.txt +0 -0
- {ultralytics_actions-0.0.43.dist-info → ultralytics_actions-0.0.44.dist-info}/top_level.txt +0 -0
actions/__init__.py
CHANGED
actions/first_interaction.py
CHANGED
@@ -47,8 +47,8 @@ def update_issue_pr_content(event, number: int, node_id: str, issue_type: str):
|
|
47
47
|
new_title = "Content Under Review"
|
48
48
|
new_body = """This post has been flagged for review by [Ultralytics Actions](https://ultralytics.com/actions) due to possible spam, abuse, or off-topic content. For more information please see our:
|
49
49
|
|
50
|
-
- [Code of Conduct](https://docs.ultralytics.com/help/
|
51
|
-
- [Security Policy](https://docs.ultralytics.com/help/security)
|
50
|
+
- [Code of Conduct](https://docs.ultralytics.com/help/code-of-conduct/)
|
51
|
+
- [Security Policy](https://docs.ultralytics.com/help/security/)
|
52
52
|
|
53
53
|
For questions or bug reports related to this action please visit https://github.com/ultralytics/actions.
|
54
54
|
|
@@ -285,7 +285,7 @@ def get_first_interaction_response(event, issue_type: str, title: str, body: str
|
|
285
285
|
|
286
286
|
1. For bug reports:
|
287
287
|
- A clear and concise description of the bug
|
288
|
-
- A minimum reproducible example (
|
288
|
+
- A minimum reproducible example [MRE](https://docs.ultralytics.com/help/minimum-reproducible-example/) that demonstrates the issue
|
289
289
|
- Your environment details (OS, Python version, package versions)
|
290
290
|
- Expected behavior vs. actual behavior
|
291
291
|
- Any error messages or logs related to the issue
|
actions/utils/common_utils.py
CHANGED
@@ -21,7 +21,7 @@ def clean_url(url):
|
|
21
21
|
|
22
22
|
|
23
23
|
def is_url(url, check=True, max_attempts=3, timeout=2):
|
24
|
-
"""Check if string is URL and
|
24
|
+
"""Check if string is URL and optionally verify it exists."""
|
25
25
|
allow_list = (
|
26
26
|
"localhost",
|
27
27
|
"127.0.0",
|
@@ -56,15 +56,29 @@ def is_url(url, check=True, max_attempts=3, timeout=2):
|
|
56
56
|
|
57
57
|
# Check response
|
58
58
|
if check:
|
59
|
+
headers = {
|
60
|
+
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36",
|
61
|
+
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
62
|
+
"Accept-Language": "en-US,en;q=0.9,es;q=0.8,zh-CN;q=0.7,zh;q=0.6",
|
63
|
+
"Accept-Encoding": "gzip, deflate, br, zstd",
|
64
|
+
"sec-ch-ua": '"Chromium";v="132", "Google Chrome";v="132", "Not_A Brand";v="99"',
|
65
|
+
"sec-ch-ua-mobile": "?0",
|
66
|
+
"sec-ch-ua-platform": '"macOS"',
|
67
|
+
"Sec-Fetch-Site": "none",
|
68
|
+
"Sec-Fetch-Mode": "navigate",
|
69
|
+
"Sec-Fetch-User": "?1",
|
70
|
+
"Sec-Fetch-Dest": "document",
|
71
|
+
"Referer": "https://www.google.com/",
|
72
|
+
"Origin": "https://www.google.com/",
|
73
|
+
}
|
74
|
+
bad_codes = {404, 410, 500, 502, 503, 504}
|
59
75
|
for attempt in range(max_attempts):
|
60
76
|
try:
|
61
|
-
headers =
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
}
|
67
|
-
return requests.head(url, headers=headers, timeout=timeout, allow_redirects=True).status_code < 400
|
77
|
+
response = requests.head(url, headers=headers, timeout=timeout, allow_redirects=True)
|
78
|
+
if response.status_code not in bad_codes:
|
79
|
+
return True
|
80
|
+
response = requests.get(url, headers=headers, timeout=timeout, allow_redirects=True, stream=True)
|
81
|
+
return response.status_code not in bad_codes # Try GET if HEAD fails
|
68
82
|
except Exception:
|
69
83
|
if attempt == max_attempts - 1: # last attempt
|
70
84
|
return False
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.44
|
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=
|
2
|
-
actions/first_interaction.py,sha256=
|
1
|
+
actions/__init__.py,sha256=hIhJBdHAJFF5RjLVqpEhHB5ahmlGCV4aqLSqkdqr4NA,742
|
2
|
+
actions/first_interaction.py,sha256=YKW7pPFrG-IxzvRoR4UYe0i8ehQdavwNSf7TzuQEAlA,17848
|
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=Jc--odEZWBrQmgI9C9rPdKIJNj8YW-mCJV71VWQyMCA,434
|
7
|
-
actions/utils/common_utils.py,sha256
|
7
|
+
actions/utils/common_utils.py,sha256=jcMtuFERmZXvDOUW6YclFNclIssxw3w7E7ilI68RpxU,4970
|
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.44.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
11
|
+
ultralytics_actions-0.0.44.dist-info/METADATA,sha256=hgyNZCI6KfkpzkSVh5O77x9P7CdLMZT2DSIjBTD0Gp4,10561
|
12
|
+
ultralytics_actions-0.0.44.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
13
|
+
ultralytics_actions-0.0.44.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
|
14
|
+
ultralytics_actions-0.0.44.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
|
15
|
+
ultralytics_actions-0.0.44.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.43.dist-info → ultralytics_actions-0.0.44.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|