ultralytics-actions 0.0.40__tar.gz → 0.0.41__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (21) hide show
  1. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/PKG-INFO +1 -1
  2. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/actions/__init__.py +2 -2
  3. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/actions/first_interaction.py +1 -1
  4. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/actions/summarize_pr.py +1 -1
  5. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/actions/summarize_release.py +12 -7
  6. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/actions/update_markdown_code_blocks.py +1 -1
  7. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/actions/utils/__init__.py +1 -1
  8. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/actions/utils/common_utils.py +1 -1
  9. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/actions/utils/github_utils.py +2 -1
  10. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/actions/utils/openai_utils.py +1 -1
  11. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/pyproject.toml +1 -1
  12. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/tests/test_urls.py +2 -1
  13. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/ultralytics_actions.egg-info/PKG-INFO +1 -1
  14. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/LICENSE +0 -0
  15. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/README.md +0 -0
  16. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/setup.cfg +0 -0
  17. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/ultralytics_actions.egg-info/SOURCES.txt +0 -0
  18. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/ultralytics_actions.egg-info/dependency_links.txt +0 -0
  19. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/ultralytics_actions.egg-info/entry_points.txt +0 -0
  20. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/ultralytics_actions.egg-info/requires.txt +0 -0
  21. {ultralytics_actions-0.0.40 → ultralytics_actions-0.0.41}/ultralytics_actions.egg-info/top_level.txt +0 -0
@@ -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>
@@ -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
@@ -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
@@ -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,4 +1,4 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
3
  # Overview:
4
4
  # This pyproject.toml file manages the build, packaging, and distribution of the Ultralytics Actions package.
@@ -1,4 +1,5 @@
1
- # Ultralytics Actions 🚀, AGPL-3.0 license
1
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
+
2
3
  # Continuous Integration (CI) GitHub Actions tests
3
4
 
4
5
  import pytest
@@ -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>