ultralytics-actions 0.0.40__py3-none-any.whl → 0.0.41__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
actions/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
3
  # project_root/
4
4
  # ├── pyproject.toml
@@ -22,4 +22,4 @@
22
22
  # ├── test_summarize_pr.py
23
23
  # └── ...
24
24
 
25
- __version__ = "0.0.40"
25
+ __version__ = "0.0.41"
@@ -1,4 +1,4 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
3
  import os
4
4
  from typing import Dict, List, Tuple
actions/summarize_pr.py CHANGED
@@ -1,4 +1,4 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
3
  import time
4
4
 
@@ -1,4 +1,4 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
3
  import os
4
4
  import re
@@ -146,13 +146,15 @@ def create_github_release(repo_name: str, tag_name: str, name: str, body: str, h
146
146
 
147
147
 
148
148
  def get_previous_tag() -> str:
149
- """Retrieves the previous Git tag, excluding the current tag, using the git describe command."""
150
- cmd = ["git", "describe", "--tags", "--abbrev=0", "--exclude", CURRENT_TAG]
149
+ """Returns previous Git tag or initial commit SHA if no tags exist."""
151
150
  try:
151
+ # Try to get previous tag first
152
+ cmd = ["git", "describe", "--tags", "--abbrev=0", "--exclude", CURRENT_TAG]
152
153
  return subprocess.run(cmd, check=True, text=True, capture_output=True).stdout.strip()
153
154
  except subprocess.CalledProcessError:
154
- print("Failed to get previous tag from git. Using previous commit.")
155
- return "HEAD~1"
155
+ # If no tags exist, get the initial commit SHA
156
+ cmd = ["git", "rev-list", "--max-parents=0", "HEAD"]
157
+ return subprocess.run(cmd, check=True, text=True, capture_output=True).stdout.strip()
156
158
 
157
159
 
158
160
  def main(*args, **kwargs):
@@ -162,9 +164,12 @@ def main(*args, **kwargs):
162
164
  if not all([action.token, CURRENT_TAG]):
163
165
  raise ValueError("One or more required environment variables are missing.")
164
166
 
165
- previous_tag = PREVIOUS_TAG or get_previous_tag()
166
-
167
167
  # Get the diff between the tags
168
+ previous_tag = (
169
+ PREVIOUS_TAG
170
+ if PREVIOUS_TAG and "none" not in PREVIOUS_TAG.lower() and PREVIOUS_TAG != CURRENT_TAG
171
+ else get_previous_tag()
172
+ )
168
173
  diff = get_release_diff(action.repository, previous_tag, CURRENT_TAG, action.headers_diff)
169
174
 
170
175
  # Get PRs merged between the tags
@@ -1,4 +1,4 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
3
  import hashlib
4
4
  import re
actions/utils/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
3
  from .common_utils import remove_html_comments
4
4
  from .github_utils import (
@@ -1,4 +1,4 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
3
  import re
4
4
  import time
@@ -1,4 +1,5 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
2
3
  import json
3
4
  import os
4
5
  from pathlib import Path
@@ -1,4 +1,4 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
3
  import os
4
4
  import time
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ultralytics-actions
3
- Version: 0.0.40
3
+ Version: 0.0.41
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>
@@ -0,0 +1,15 @@
1
+ actions/__init__.py,sha256=Pjd9caY-pMv4WoWKvfJFD211p_wu6csWUZh5UmqshX0,742
2
+ actions/first_interaction.py,sha256=n88RWru6ZXttFgmBXVMUBJEXoC9UVIV_TOlOWAR2pO4,17846
3
+ actions/summarize_pr.py,sha256=Pfcm6ArfZfcMme48FcCGNmMwrFFlsG0czifhXHDKAlY,11166
4
+ actions/summarize_release.py,sha256=zbd0tD0-7eKjVsMZXNCVpZ0AQqgLxs6KIeP81XXFAtw,8702
5
+ actions/update_markdown_code_blocks.py,sha256=DN6rrDw2VHXUTetrrg1SHlYDco9iaGOfQBKFORqbCBI,6362
6
+ actions/utils/__init__.py,sha256=Jc--odEZWBrQmgI9C9rPdKIJNj8YW-mCJV71VWQyMCA,434
7
+ actions/utils/common_utils.py,sha256=-gYRI0KJqG7Ht4JPGUxCYpHRKFfuSGi1lPr__F-SGuw,4086
8
+ actions/utils/github_utils.py,sha256=0h0Hz2tgUta61Ymn9YggRXBZ7aZdF5krKnX7Tj9jqRU,7068
9
+ actions/utils/openai_utils.py,sha256=U7DjxTdFGdhmWSE4_KIg1yPQdtrfG4GkbNZCgMw4_1Q,1822
10
+ ultralytics_actions-0.0.41.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
+ ultralytics_actions-0.0.41.dist-info/METADATA,sha256=mZ7dSiUJ7NymQQKmXUFWsjEuxgN6VwboauKyWxgyOkI,10561
12
+ ultralytics_actions-0.0.41.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
13
+ ultralytics_actions-0.0.41.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
14
+ ultralytics_actions-0.0.41.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
15
+ ultralytics_actions-0.0.41.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- actions/__init__.py,sha256=Nt0UM8yKv4lys_t-BRvlvGbyoHTR8pcDCP10Qia7Suc,749
2
- actions/first_interaction.py,sha256=U-TcRUYlueoNh98KbF_i5WycYfuX8lrNBrWDDKphLzU,17853
3
- actions/summarize_pr.py,sha256=Uq5TswlNZuxn7HenU8KhWr3z3m496_THWsW1zlYKQvU,11173
4
- actions/summarize_release.py,sha256=eEah_BkvdHaFsR1Nxx-WbiOC_xmoXfzQpfwQS0cGJqc,8462
5
- actions/update_markdown_code_blocks.py,sha256=WBNcMD_KKsZS-qSPBn6O1G0ggQ_VrT-jTQffbg7xH_M,6369
6
- actions/utils/__init__.py,sha256=W82wrlyOAlIPDOtJkgSKjJVXn6QMAoa43gEI0-aWkjs,441
7
- actions/utils/common_utils.py,sha256=wnpp541-toZU0CSxihXyk7WSbGI_s5j3TRFOlb-OSEI,4093
8
- actions/utils/github_utils.py,sha256=LCTn-GEceXM1EPixpnOFwkPjW5zyfoDs_SMbHMLUESE,7074
9
- actions/utils/openai_utils.py,sha256=CU0FdeUW6qeZsxYCC2NUcGjns7w6hDvT8PwaRlG7j9E,1829
10
- ultralytics_actions-0.0.40.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
- ultralytics_actions-0.0.40.dist-info/METADATA,sha256=oHLGFMSEijCWrCgUiijfmMTNaGPE6cnMKonUnsRF6JQ,10561
12
- ultralytics_actions-0.0.40.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
13
- ultralytics_actions-0.0.40.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
14
- ultralytics_actions-0.0.40.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
15
- ultralytics_actions-0.0.40.dist-info/RECORD,,