ultralytics-actions 0.0.85__py3-none-any.whl → 0.0.86__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/summarize_release.py +19 -4
- {ultralytics_actions-0.0.85.dist-info → ultralytics_actions-0.0.86.dist-info}/METADATA +1 -1
- {ultralytics_actions-0.0.85.dist-info → ultralytics_actions-0.0.86.dist-info}/RECORD +8 -8
- {ultralytics_actions-0.0.85.dist-info → ultralytics_actions-0.0.86.dist-info}/WHEEL +1 -1
- {ultralytics_actions-0.0.85.dist-info → ultralytics_actions-0.0.86.dist-info}/entry_points.txt +0 -0
- {ultralytics_actions-0.0.85.dist-info → ultralytics_actions-0.0.86.dist-info}/licenses/LICENSE +0 -0
- {ultralytics_actions-0.0.85.dist-info → ultralytics_actions-0.0.86.dist-info}/top_level.txt +0 -0
actions/__init__.py
CHANGED
actions/summarize_release.py
CHANGED
@@ -25,7 +25,15 @@ def get_prs_between_tags(event, previous_tag: str, latest_tag: str) -> list:
|
|
25
25
|
url = f"{GITHUB_API_URL}/repos/{event.repository}/compare/{previous_tag}...{latest_tag}"
|
26
26
|
r = event.get(url)
|
27
27
|
|
28
|
+
if r.status_code != 200:
|
29
|
+
print(f"Failed to get comparison between {previous_tag} and {latest_tag}, status: {r.status_code}")
|
30
|
+
return []
|
31
|
+
|
28
32
|
data = r.json()
|
33
|
+
if "commits" not in data:
|
34
|
+
print(f"No commits found in comparison between {previous_tag} and {latest_tag}")
|
35
|
+
return []
|
36
|
+
|
29
37
|
pr_numbers = set()
|
30
38
|
for commit in data["commits"]:
|
31
39
|
pr_matches = re.findall(r"#(\d+)", commit["commit"]["message"])
|
@@ -139,9 +147,9 @@ def create_github_release(event, tag_name: str, name: str, body: str):
|
|
139
147
|
event.post(url, json=data)
|
140
148
|
|
141
149
|
|
142
|
-
def
|
143
|
-
"""
|
144
|
-
cmd = ["git", "describe", "--tags", "--abbrev=0", "--exclude",
|
150
|
+
def get_actual_previous_tag(current_tag: str) -> str:
|
151
|
+
"""Gets the actual previous tag using git, excluding the current tag."""
|
152
|
+
cmd = ["git", "describe", "--tags", "--abbrev=0", "--exclude", current_tag]
|
145
153
|
try:
|
146
154
|
return subprocess.run(cmd, check=True, text=True, capture_output=True).stdout.strip()
|
147
155
|
except subprocess.CalledProcessError:
|
@@ -156,7 +164,14 @@ def main(*args, **kwargs):
|
|
156
164
|
if not all([event.token, CURRENT_TAG]):
|
157
165
|
raise ValueError("One or more required environment variables are missing.")
|
158
166
|
|
159
|
-
|
167
|
+
# Try PREVIOUS_TAG first, fall back to actual previous tag if comparison fails
|
168
|
+
previous_tag = PREVIOUS_TAG or get_actual_previous_tag(CURRENT_TAG)
|
169
|
+
|
170
|
+
# Test if the previous tag works for comparison
|
171
|
+
test_url = f"{GITHUB_API_URL}/repos/{event.repository}/compare/{previous_tag}...{CURRENT_TAG}"
|
172
|
+
if event.get(test_url).status_code != 200:
|
173
|
+
previous_tag = get_actual_previous_tag(CURRENT_TAG)
|
174
|
+
print(f"Using actual previous tag: {previous_tag}")
|
160
175
|
|
161
176
|
# Get the diff between the tags
|
162
177
|
diff = get_release_diff(event, previous_tag, CURRENT_TAG)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.86
|
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,8 +1,8 @@
|
|
1
|
-
actions/__init__.py,sha256=
|
1
|
+
actions/__init__.py,sha256=3zS7IZrjILS9WQKAlePlzdxRv5OCERvqYCJtgIeVtR0,742
|
2
2
|
actions/dispatch_actions.py,sha256=vbA4w_B8vMXMen__ck2WoDsUFCELjXOQbpLzZCmqTXg,4240
|
3
3
|
actions/first_interaction.py,sha256=whphdBrWkcWRt6RgOeK2dUoGq3aBTqttQdokxVjkye4,16309
|
4
4
|
actions/summarize_pr.py,sha256=NCaDSbw4PVoRbPJzji_Ua2HadI2pn7QOE_dy3VK9_cc,10463
|
5
|
-
actions/summarize_release.py,sha256=
|
5
|
+
actions/summarize_release.py,sha256=JUGlQ4c5E5Ya_kpYSn-Hs_E1omdFWgsvZLIxOic1qEI,8635
|
6
6
|
actions/update_file_headers.py,sha256=dAu8RWOn-CkuFZHa5LT1-BvNxYX4FRQe2B1UDAjvG3I,6648
|
7
7
|
actions/update_markdown_code_blocks.py,sha256=9PL7YIQfApRNAa0que2hYHv7umGZTZoHlblesB0xFj4,8587
|
8
8
|
actions/utils/__init__.py,sha256=7k4cmFX0Td99Uzgsd8Mm-E0xq5kQ5ZJoPM_oGCVD4CU,804
|
@@ -10,9 +10,9 @@ actions/utils/common_utils.py,sha256=2eNwGJFigl9bBXcyWzdr8mr97Lrx7zFKWIFYugZcUJw
|
|
10
10
|
actions/utils/github_utils.py,sha256=wjivM9FPZwaItXpQiYbGbnGdK6v4ayLEFvQT2xhRLq4,8202
|
11
11
|
actions/utils/openai_utils.py,sha256=09kW4K2LOc6KsWz5tijf2Piinhu3PIKPDVkRC3KyIxU,2943
|
12
12
|
actions/utils/version_utils.py,sha256=lKY2lLtYdxejKvqD9hFJiARMrYMHnP_KC_zmcLUmD20,3188
|
13
|
-
ultralytics_actions-0.0.
|
14
|
-
ultralytics_actions-0.0.
|
15
|
-
ultralytics_actions-0.0.
|
16
|
-
ultralytics_actions-0.0.
|
17
|
-
ultralytics_actions-0.0.
|
18
|
-
ultralytics_actions-0.0.
|
13
|
+
ultralytics_actions-0.0.86.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
14
|
+
ultralytics_actions-0.0.86.dist-info/METADATA,sha256=Fv6Y8gk0PM6dvUBiqR9IAQyrOVYqFB9sVEmL_m6noNk,11638
|
15
|
+
ultralytics_actions-0.0.86.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
16
|
+
ultralytics_actions-0.0.86.dist-info/entry_points.txt,sha256=rvqr6Juj7lCJL1DQLwMmOrA8R2Q8tyR_dvCe0mYuJ8s,441
|
17
|
+
ultralytics_actions-0.0.86.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
|
18
|
+
ultralytics_actions-0.0.86.dist-info/RECORD,,
|
{ultralytics_actions-0.0.85.dist-info → ultralytics_actions-0.0.86.dist-info}/entry_points.txt
RENAMED
File without changes
|
{ultralytics_actions-0.0.85.dist-info → ultralytics_actions-0.0.86.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
File without changes
|