ultralytics-actions 0.0.14__py3-none-any.whl → 0.0.16__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_pr.py +5 -5
- actions/utils/github_utils.py +5 -2
- {ultralytics_actions-0.0.14.dist-info → ultralytics_actions-0.0.16.dist-info}/METADATA +1 -1
- {ultralytics_actions-0.0.14.dist-info → ultralytics_actions-0.0.16.dist-info}/RECORD +9 -9
- {ultralytics_actions-0.0.14.dist-info → ultralytics_actions-0.0.16.dist-info}/LICENSE +0 -0
- {ultralytics_actions-0.0.14.dist-info → ultralytics_actions-0.0.16.dist-info}/WHEEL +0 -0
- {ultralytics_actions-0.0.14.dist-info → ultralytics_actions-0.0.16.dist-info}/entry_points.txt +0 -0
- {ultralytics_actions-0.0.14.dist-info → ultralytics_actions-0.0.16.dist-info}/top_level.txt +0 -0
actions/__init__.py
CHANGED
actions/summarize_pr.py
CHANGED
@@ -42,7 +42,7 @@ def generate_pr_summary(repo_name, diff_text):
|
|
42
42
|
reply = get_completion(messages)
|
43
43
|
if len(diff_text) > limit:
|
44
44
|
reply = "**WARNING ⚠️** this PR is very large, summary may not cover all changes.\n\n" + reply
|
45
|
-
return reply
|
45
|
+
return SUMMARY_START + reply
|
46
46
|
|
47
47
|
|
48
48
|
def update_pr_description(repo_name, pr_number, new_summary, max_retries=2):
|
@@ -58,13 +58,13 @@ def update_pr_description(repo_name, pr_number, new_summary, max_retries=2):
|
|
58
58
|
time.sleep(1)
|
59
59
|
|
60
60
|
# Check if existing summary is present and update accordingly
|
61
|
-
|
62
|
-
if
|
61
|
+
start = "## 🛠️ PR Summary"
|
62
|
+
if start in description:
|
63
63
|
print("Existing PR Summary found, replacing.")
|
64
|
-
updated_description =
|
64
|
+
updated_description = description.split(start)[0] + new_summary
|
65
65
|
else:
|
66
66
|
print("PR Summary not found, appending.")
|
67
|
-
updated_description =
|
67
|
+
updated_description = description + "\n\n" + new_summary
|
68
68
|
|
69
69
|
# Update the PR description
|
70
70
|
update_response = requests.patch(pr_url, json={"body": updated_description}, headers=GITHUB_HEADERS)
|
actions/utils/github_utils.py
CHANGED
@@ -5,6 +5,8 @@ from pathlib import Path
|
|
5
5
|
|
6
6
|
import requests
|
7
7
|
|
8
|
+
from actions import __version__
|
9
|
+
|
8
10
|
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
|
9
11
|
GITHUB_REPOSITORY = os.getenv("GITHUB_REPOSITORY")
|
10
12
|
GITHUB_EVENT_NAME = os.getenv("GITHUB_EVENT_NAME")
|
@@ -121,7 +123,8 @@ def ultralytics_actions_info():
|
|
121
123
|
|
122
124
|
# Print information
|
123
125
|
max_key_length = max(len(key) for key in info.keys())
|
124
|
-
|
126
|
+
header = f"Ultralytics Actions {__version__} Information " + "-" * 40
|
127
|
+
print(header)
|
125
128
|
for key, value in info.items():
|
126
129
|
print(f"{key:<{max_key_length + 5}}{value}")
|
127
|
-
print("-" *
|
130
|
+
print("-" * len(header)) # footer
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.16
|
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=
|
1
|
+
actions/__init__.py,sha256=XbGiaT1FFYw5h89mMwaZtiuu7w8d6PS-K4s_ZxYBsGI,749
|
2
2
|
actions/first_interaction.py,sha256=cLXo5hmhOgTfk7F9LbGJeRdg6vvrKUe-0taCa_TkpAg,17683
|
3
|
-
actions/summarize_pr.py,sha256=
|
3
|
+
actions/summarize_pr.py,sha256=vrLg_Ddjd9WvWxHfnWn_ksexlJfWpxP020e6fFcH4ic,3968
|
4
4
|
actions/summarize_release.py,sha256=l8NBdTAXLysfNKl1Kf_1tyuBRmeEBLyzTDXS6s5_eQg,8350
|
5
5
|
actions/update_markdown_code_blocks.py,sha256=WBNcMD_KKsZS-qSPBn6O1G0ggQ_VrT-jTQffbg7xH_M,6369
|
6
6
|
actions/utils/__init__.py,sha256=0vRjFc7i2WOlphuxdUxQo5BuNipgwGw2Bs-fdUBDeUw,973
|
7
7
|
actions/utils/common_utils.py,sha256=XT8GG0SWBtlZLruA0nKrY4AJpkitvPbM8zndE8etuDo,3548
|
8
|
-
actions/utils/github_utils.py,sha256=
|
8
|
+
actions/utils/github_utils.py,sha256=dnrbU4Z4LJBIOZLCRifZqVfyiOqsJMIHBHOssj-Y2y8,5488
|
9
9
|
actions/utils/openai_utils.py,sha256=SQWOjU3hdfI_0LKb3uqM5pNsoMyE7W0hGxXy7ISk97M,1823
|
10
|
-
ultralytics_actions-0.0.
|
11
|
-
ultralytics_actions-0.0.
|
12
|
-
ultralytics_actions-0.0.
|
13
|
-
ultralytics_actions-0.0.
|
14
|
-
ultralytics_actions-0.0.
|
15
|
-
ultralytics_actions-0.0.
|
10
|
+
ultralytics_actions-0.0.16.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
11
|
+
ultralytics_actions-0.0.16.dist-info/METADATA,sha256=1ZoVo7_vkEwdqHKuO5cJoNKV__2R4UXo-V9MPBTe7hE,10535
|
12
|
+
ultralytics_actions-0.0.16.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
13
|
+
ultralytics_actions-0.0.16.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
|
14
|
+
ultralytics_actions-0.0.16.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
|
15
|
+
ultralytics_actions-0.0.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.14.dist-info → ultralytics_actions-0.0.16.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|