ultralytics-actions 0.0.49__py3-none-any.whl → 0.0.50__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 CHANGED
@@ -22,4 +22,4 @@
22
22
  # ├── test_summarize_pr.py
23
23
  # └── ...
24
24
 
25
- __version__ = "0.0.49"
25
+ __version__ = "0.0.50"
actions/summarize_pr.py CHANGED
@@ -26,7 +26,7 @@ def generate_merge_message(pr_summary=None, pr_credit=None, pr_url=None):
26
26
  {
27
27
  "role": "user",
28
28
  "content": (
29
- f"Write a warm thank-you comment for the merged PR {pr_url} by {pr_credit}."
29
+ f"Write a warm thank-you comment for the merged PR {pr_url} by {pr_credit}. "
30
30
  f"Context:\n{pr_summary}\n\n"
31
31
  f"Start with an enthusiastic note about the merge, incorporate a relevant inspirational quote from a historical "
32
32
  f"figure, and connect it to the PR’s impact. Keep it concise yet meaningful, ensuring contributors feel valued."
@@ -34,27 +34,24 @@ BAD_HTTP_CODES = frozenset(
34
34
  504, # Gateway Timeout - upstream server didn't respond in time
35
35
  }
36
36
  )
37
- URL_IGNORE_LIST = frozenset(
38
- {
39
- "localhost",
40
- "127.0.0",
41
- ":5000",
42
- ":3000",
43
- ":8000",
44
- ":8080",
45
- ":6006",
46
- "MODEL_ID",
47
- "API_KEY",
48
- "url",
49
- "example",
50
- "mailto:",
51
- "github.com", # ignore GitHub links that may be private repos
52
- "linkedin.com",
53
- "twitter.com",
54
- "x.com",
55
- "storage.googleapis.com", # private GCS buckets
56
- }
57
- )
37
+ URL_IGNORE_LIST = { # use a set (not frozenset) to update with possible private GitHub repos
38
+ "localhost",
39
+ "127.0.0",
40
+ ":5000",
41
+ ":3000",
42
+ ":8000",
43
+ ":8080",
44
+ ":6006",
45
+ "MODEL_ID",
46
+ "API_KEY",
47
+ "url",
48
+ "example",
49
+ "mailto:",
50
+ "linkedin.com",
51
+ "twitter.com",
52
+ "x.com",
53
+ "storage.googleapis.com", # private GCS buckets
54
+ }
58
55
  URL_PATTERN = re.compile(
59
56
  r"\[([^]]+)]\(([^)]+)\)" # Matches Markdown links [text](url)
60
57
  r"|"
@@ -81,7 +78,7 @@ def clean_url(url):
81
78
 
82
79
 
83
80
  def is_url(url, session=None, check=True, max_attempts=3, timeout=2):
84
- """Check if string is URL and optionally verify it exists."""
81
+ """Check if string is URL and optionally verify it exists, with fallback for GitHub repos."""
85
82
  try:
86
83
  # Check allow list
87
84
  if any(x in url for x in URL_IGNORE_LIST):
@@ -105,6 +102,16 @@ def is_url(url, session=None, check=True, max_attempts=3, timeout=2):
105
102
  for method in (requester.head, requester.get):
106
103
  if method(url, stream=method == requester.get, **kwargs).status_code not in BAD_HTTP_CODES:
107
104
  return True
105
+
106
+ # If GitHub and check fails (repo might be private), add the base GitHub URL to ignore list
107
+ if result.hostname == "github.com":
108
+ parts = result.path.strip("/").split("/")
109
+ if len(parts) >= 2:
110
+ base_url = f"https://github.com/{parts[0]}/{parts[1]}" # https://github.com/org/repo
111
+ if requester.head(base_url, **kwargs).status_code == 404:
112
+ URL_IGNORE_LIST.add(base_url)
113
+ return True
114
+
108
115
  return False
109
116
  except Exception:
110
117
  if attempt == max_attempts - 1: # last attempt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ultralytics-actions
3
- Version: 0.0.49
3
+ Version: 0.0.50
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=YUeY18AoDEXKIMWCCr6xUi_stDUqF6_LCok9BxN8iQg,742
1
+ actions/__init__.py,sha256=4U8iPnscnkKIwXcYrHT-0T4HHmy37vzw_sbFoMwGSyw,742
2
2
  actions/first_interaction.py,sha256=Oosw3GlXObF4RxYJG8haIjKXSV4MAx_uPXfMdRKY5qA,17851
3
- actions/summarize_pr.py,sha256=dnjZcbGItvhpxq2yNiSWuiPBmZTHAW3ufu2upDgOT3I,11074
3
+ actions/summarize_pr.py,sha256=gLtKlE_iKzP92vBfA-KA9bXUwdrKIe79pH2f4Oyq_gg,11075
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=o2dMSS7TxpwJLU58ybcZFgtaV-PM5lzQRP0B9cW-bBc,5420
7
+ actions/utils/common_utils.py,sha256=LJ79U5sQuTnVyhc22Bryb5YUBAWy13rGoHdfbaBQl3s,5988
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.49.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
- ultralytics_actions-0.0.49.dist-info/METADATA,sha256=nw_Qne-ukAxDpCNRxbDRqN7jiTTIHNZqf5xxK8XxU3w,10561
12
- ultralytics_actions-0.0.49.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
13
- ultralytics_actions-0.0.49.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
14
- ultralytics_actions-0.0.49.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
15
- ultralytics_actions-0.0.49.dist-info/RECORD,,
10
+ ultralytics_actions-0.0.50.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
+ ultralytics_actions-0.0.50.dist-info/METADATA,sha256=qPiz8EXLadPuzCesY3Sojb5Hs-D-B2j5znK16qmYR9I,10561
12
+ ultralytics_actions-0.0.50.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
13
+ ultralytics_actions-0.0.50.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
14
+ ultralytics_actions-0.0.50.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
15
+ ultralytics_actions-0.0.50.dist-info/RECORD,,