ultralytics-actions 0.0.73__tar.gz → 0.0.75__tar.gz
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.
- {ultralytics_actions-0.0.73/ultralytics_actions.egg-info → ultralytics_actions-0.0.75}/PKG-INFO +1 -1
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/__init__.py +1 -1
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/update_file_headers.py +66 -68
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/pyproject.toml +1 -1
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75/ultralytics_actions.egg-info}/PKG-INFO +1 -1
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/ultralytics_actions.egg-info/entry_points.txt +1 -1
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/LICENSE +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/README.md +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/dispatch_actions.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/first_interaction.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/summarize_pr.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/summarize_release.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/update_markdown_code_blocks.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/utils/__init__.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/utils/common_utils.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/utils/github_utils.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/utils/openai_utils.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/setup.cfg +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_cli_commands.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_common_utils.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_dispatch_actions.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_first_interaction.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_github_utils.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_init.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_openai_utils.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_summarize_pr.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_summarize_release.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_update_markdown_codeblocks.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_urls.py +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/ultralytics_actions.egg-info/SOURCES.txt +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/ultralytics_actions.egg-info/dependency_links.txt +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/ultralytics_actions.egg-info/requires.txt +0 -0
- {ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/ultralytics_actions.egg-info/top_level.txt +0 -0
{ultralytics_actions-0.0.73/ultralytics_actions.egg-info → ultralytics_actions-0.0.75}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.75
|
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>
|
@@ -83,72 +83,70 @@ def update_file(file_path, prefix, block_start, block_end, base_header):
|
|
83
83
|
else:
|
84
84
|
formatted_header = f"# {base_header}\n"
|
85
85
|
|
86
|
-
#
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
if
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
if second_line == "" or second_line in ["#", "//", "/*", "*", "<!--", "%"]:
|
122
|
-
# Keep existing blank/comment line
|
123
|
-
new_lines.append(remaining_lines[1])
|
124
|
-
new_lines.extend(remaining_lines[2:])
|
125
|
-
else:
|
126
|
-
# Add blank line
|
127
|
-
new_lines.append("\n")
|
128
|
-
new_lines.extend(remaining_lines[1:])
|
129
|
-
else:
|
130
|
-
# Only header line, no need for blank line after
|
131
|
-
pass
|
132
|
-
# No header found, add it
|
86
|
+
# Save original content for comparison
|
87
|
+
original_content = "".join(lines)
|
88
|
+
|
89
|
+
# Create two separate line collections:
|
90
|
+
# 1. prefix_lines: Special first line + header + blank line
|
91
|
+
# 2. content_lines: The actual file content (excluding header)
|
92
|
+
prefix_lines = []
|
93
|
+
|
94
|
+
# Check for special first line
|
95
|
+
special_line_index = -1
|
96
|
+
if lines and (lines[0].startswith("#!") or lines[0].startswith("<?xml") or lines[0].startswith("<!DOCTYPE")):
|
97
|
+
special_line_index = 0
|
98
|
+
prefix_lines.append(lines[0])
|
99
|
+
|
100
|
+
# Find existing header
|
101
|
+
header_index = -1
|
102
|
+
start_idx = special_line_index + 1 if special_line_index >= 0 else 0
|
103
|
+
end_idx = min(start_idx + 5, len(lines)) # Look in first few lines
|
104
|
+
|
105
|
+
for i in range(start_idx, end_idx):
|
106
|
+
if "Ultralytics " in lines[i]:
|
107
|
+
header_index = i
|
108
|
+
break
|
109
|
+
|
110
|
+
# Add the formatted header to prefix lines
|
111
|
+
prefix_lines.append(formatted_header)
|
112
|
+
|
113
|
+
# Determine where content starts
|
114
|
+
if header_index >= 0:
|
115
|
+
# Content starts after existing header
|
116
|
+
content_start = header_index + 1
|
117
|
+
# Skip blank line after header if present
|
118
|
+
if content_start < len(lines) and not lines[content_start].strip():
|
119
|
+
content_start += 1
|
120
|
+
content_lines = lines[content_start:]
|
133
121
|
else:
|
134
|
-
#
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
if
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
122
|
+
# No header found
|
123
|
+
if special_line_index >= 0:
|
124
|
+
# Content starts after special line
|
125
|
+
content_lines = lines[special_line_index + 1 :]
|
126
|
+
else:
|
127
|
+
# No special line, content starts at beginning
|
128
|
+
content_lines = lines
|
129
|
+
|
130
|
+
# Add blank line before content if first content line isn't already blank
|
131
|
+
if content_lines and content_lines[0].strip():
|
132
|
+
prefix_lines.append("\n")
|
133
|
+
|
134
|
+
# Combine prefix lines and content lines
|
135
|
+
final_lines = prefix_lines + content_lines
|
136
|
+
|
137
|
+
# Check if content changed
|
138
|
+
new_content = "".join(final_lines)
|
139
|
+
if new_content == original_content:
|
140
|
+
return False
|
141
|
+
|
142
|
+
# Write updated content
|
143
|
+
try:
|
144
|
+
with open(file_path, "w", encoding="utf-8") as f:
|
145
|
+
f.writelines(final_lines)
|
146
|
+
return True
|
147
|
+
except Exception as e:
|
148
|
+
print(f"Error writing {file_path}: {e}")
|
149
|
+
return False
|
152
150
|
|
153
151
|
|
154
152
|
def main(*args, **kwargs):
|
@@ -159,11 +157,11 @@ def main(*args, **kwargs):
|
|
159
157
|
if event.is_repo_private() and event.repository.startswith("ultralytics/"):
|
160
158
|
from datetime import datetime
|
161
159
|
|
162
|
-
notice = f"
|
163
|
-
header = f"
|
160
|
+
notice = f"© 2014-{datetime.now().year} Ultralytics Inc. 🚀"
|
161
|
+
header = f"{notice} All rights reserved. CONFIDENTIAL: Unauthorized use or distribution prohibited."
|
164
162
|
else:
|
165
163
|
header = "Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license"
|
166
|
-
elif HEADER and HEADER.lower() not in {"true", "false", "none"}:
|
164
|
+
elif HEADER and str(HEADER).lower() not in {"true", "false", "none"}:
|
167
165
|
header = HEADER
|
168
166
|
else:
|
169
167
|
return
|
@@ -88,7 +88,7 @@ ultralytics-actions-first-interaction = "actions.first_interaction:main"
|
|
88
88
|
ultralytics-actions-summarize-pr = "actions.summarize_pr:main"
|
89
89
|
ultralytics-actions-summarize-release = "actions.summarize_release:main"
|
90
90
|
ultralytics-actions-update-markdown-code-blocks = "actions.update_markdown_code_blocks:main"
|
91
|
-
ultralytics-actions-
|
91
|
+
ultralytics-actions-headers = "actions.update_file_headers:main"
|
92
92
|
ultralytics-actions-info = "actions.utils:ultralytics_actions_info"
|
93
93
|
|
94
94
|
[tool.setuptools]
|
{ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75/ultralytics_actions.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.75
|
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,6 +1,6 @@
|
|
1
1
|
[console_scripts]
|
2
2
|
ultralytics-actions-first-interaction = actions.first_interaction:main
|
3
|
-
ultralytics-actions-
|
3
|
+
ultralytics-actions-headers = actions.update_file_headers:main
|
4
4
|
ultralytics-actions-info = actions.utils:ultralytics_actions_info
|
5
5
|
ultralytics-actions-summarize-pr = actions.summarize_pr:main
|
6
6
|
ultralytics-actions-summarize-release = actions.summarize_release:main
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/actions/update_markdown_code_blocks.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/tests/test_update_markdown_codeblocks.py
RENAMED
File without changes
|
File without changes
|
{ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/ultralytics_actions.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/ultralytics_actions.egg-info/requires.txt
RENAMED
File without changes
|
{ultralytics_actions-0.0.73 → ultralytics_actions-0.0.75}/ultralytics_actions.egg-info/top_level.txt
RENAMED
File without changes
|