ultralytics-actions 0.0.10__tar.gz → 0.0.22__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.10/ultralytics_actions.egg-info → ultralytics_actions-0.0.22}/PKG-INFO +3 -2
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/README.md +1 -1
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/__init__.py +1 -1
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/summarize_pr.py +20 -12
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/utils/common_utils.py +1 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/utils/github_utils.py +7 -3
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/utils/openai_utils.py +1 -1
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/pyproject.toml +1 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22/ultralytics_actions.egg-info}/PKG-INFO +3 -2
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/LICENSE +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/first_interaction.py +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/summarize_release.py +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/update_markdown_code_blocks.py +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/utils/__init__.py +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/setup.cfg +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/ultralytics_actions.egg-info/SOURCES.txt +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/ultralytics_actions.egg-info/dependency_links.txt +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/ultralytics_actions.egg-info/entry_points.txt +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/ultralytics_actions.egg-info/requires.txt +0 -0
- {ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/ultralytics_actions.egg-info/top_level.txt +0 -0
{ultralytics_actions-0.0.10/ultralytics_actions.egg-info → ultralytics_actions-0.0.22}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.22
|
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>
|
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
23
24
|
Classifier: Topic :: Software Development
|
24
25
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
25
26
|
Classifier: Topic :: Internet :: WWW/HTTP
|
@@ -42,7 +43,7 @@ Welcome to the [Ultralytics Actions](https://github.com/ultralytics/actions) rep
|
|
42
43
|
|
43
44
|
[](https://github.com/marketplace/actions/ultralytics-actions) [](https://github.com/ultralytics/actions/actions/workflows/format.yml) <a href="https://discord.com/invite/ultralytics"><img alt="Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a> <a href="https://community.ultralytics.com/"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a> <a href="https://reddit.com/r/ultralytics"><img alt="Ultralytics Reddit" src="https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue"></a>
|
44
45
|
|
45
|
-
[](https://badge.fury.io/py/ultralytics-actions) [](https://pepy.tech/
|
46
|
+
[](https://badge.fury.io/py/ultralytics-actions) [](https://www.pepy.tech/projects/ultralytics-actions)
|
46
47
|
|
47
48
|
## 📄 Actions Description
|
48
49
|
|
@@ -6,7 +6,7 @@ Welcome to the [Ultralytics Actions](https://github.com/ultralytics/actions) rep
|
|
6
6
|
|
7
7
|
[](https://github.com/marketplace/actions/ultralytics-actions) [](https://github.com/ultralytics/actions/actions/workflows/format.yml) <a href="https://discord.com/invite/ultralytics"><img alt="Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a> <a href="https://community.ultralytics.com/"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a> <a href="https://reddit.com/r/ultralytics"><img alt="Ultralytics Reddit" src="https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue"></a>
|
8
8
|
|
9
|
-
[](https://badge.fury.io/py/ultralytics-actions) [](https://pepy.tech/
|
9
|
+
[](https://badge.fury.io/py/ultralytics-actions) [](https://www.pepy.tech/projects/ultralytics-actions)
|
10
10
|
|
11
11
|
## 📄 Actions Description
|
12
12
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
|
2
2
|
|
3
|
+
import time
|
4
|
+
|
3
5
|
import requests
|
4
6
|
|
5
7
|
from .utils import (
|
@@ -39,24 +41,30 @@ def generate_pr_summary(repo_name, diff_text):
|
|
39
41
|
]
|
40
42
|
reply = get_completion(messages)
|
41
43
|
if len(diff_text) > limit:
|
42
|
-
|
43
|
-
|
44
|
-
return SUMMARY_START + reply
|
44
|
+
reply = "**WARNING ⚠️** this PR is very large, summary may not cover all changes.\n\n" + reply
|
45
|
+
return SUMMARY_START + reply
|
45
46
|
|
46
47
|
|
47
|
-
def update_pr_description(repo_name, pr_number, new_summary):
|
48
|
-
"""Updates
|
49
|
-
# Fetch the current PR description
|
48
|
+
def update_pr_description(repo_name, pr_number, new_summary, max_retries=2):
|
49
|
+
"""Updates PR description with new summary, retrying if description is None."""
|
50
50
|
pr_url = f"{GITHUB_API_URL}/repos/{repo_name}/pulls/{pr_number}"
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
description = ""
|
52
|
+
for i in range(max_retries + 1):
|
53
|
+
description = requests.get(pr_url, headers=GITHUB_HEADERS).json().get("body") or ""
|
54
|
+
if description:
|
55
|
+
break
|
56
|
+
if i < max_retries:
|
57
|
+
print("No current PR description found, retrying...")
|
58
|
+
time.sleep(1)
|
54
59
|
|
55
60
|
# Check if existing summary is present and update accordingly
|
56
|
-
|
57
|
-
|
61
|
+
start = "## 🛠️ PR Summary"
|
62
|
+
if start in description:
|
63
|
+
print("Existing PR Summary found, replacing.")
|
64
|
+
updated_description = description.split(start)[0] + new_summary
|
58
65
|
else:
|
59
|
-
|
66
|
+
print("PR Summary not found, appending.")
|
67
|
+
updated_description = description + "\n\n" + new_summary
|
60
68
|
|
61
69
|
# Update the PR description
|
62
70
|
update_response = requests.patch(pr_url, json={"body": updated_description}, headers=GITHUB_HEADERS)
|
@@ -36,6 +36,7 @@ def is_url(url, check=True, max_attempts=3, timeout=2):
|
|
36
36
|
"mailto:",
|
37
37
|
"github.com", # ignore GitHub links that may be private repos
|
38
38
|
"kaggle.com", # blocks automated header requests
|
39
|
+
"reddit.com", # blocks automated header requests
|
39
40
|
)
|
40
41
|
try:
|
41
42
|
# Check allow list
|
@@ -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")
|
@@ -109,6 +111,7 @@ def ultralytics_actions_info():
|
|
109
111
|
"github.ref": os.environ.get("GITHUB_REF"),
|
110
112
|
"github.head_ref": os.environ.get("GITHUB_HEAD_REF"),
|
111
113
|
"github.base_ref": os.environ.get("GITHUB_BASE_REF"),
|
114
|
+
"github.base_sha": PR.get("base", {}).get("sha"),
|
112
115
|
}
|
113
116
|
|
114
117
|
if GITHUB_EVENT_NAME == "discussion":
|
@@ -120,8 +123,9 @@ def ultralytics_actions_info():
|
|
120
123
|
)
|
121
124
|
|
122
125
|
# Print information
|
123
|
-
max_key_length = max(len(key) for key in info
|
124
|
-
|
126
|
+
max_key_length = max(len(key) for key in info)
|
127
|
+
header = f"Ultralytics Actions {__version__} Information " + "-" * 40
|
128
|
+
print(header)
|
125
129
|
for key, value in info.items():
|
126
130
|
print(f"{key:<{max_key_length + 5}}{value}")
|
127
|
-
print("-" *
|
131
|
+
print("-" * len(header)) # footer
|
@@ -9,7 +9,7 @@ import requests
|
|
9
9
|
from actions.utils.common_utils import check_links_in_string
|
10
10
|
|
11
11
|
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
12
|
-
OPENAI_MODEL = os.getenv("OPENAI_MODEL", "gpt-4o")
|
12
|
+
OPENAI_MODEL = os.getenv("OPENAI_MODEL", "gpt-4o-2024-11-20")
|
13
13
|
|
14
14
|
|
15
15
|
def get_completion(
|
@@ -57,6 +57,7 @@ classifiers = [
|
|
57
57
|
"Programming Language :: Python :: 3.10",
|
58
58
|
"Programming Language :: Python :: 3.11",
|
59
59
|
"Programming Language :: Python :: 3.12",
|
60
|
+
"Programming Language :: Python :: 3.13",
|
60
61
|
"Topic :: Software Development",
|
61
62
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
62
63
|
"Topic :: Internet :: WWW/HTTP",
|
{ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22/ultralytics_actions.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.22
|
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>
|
@@ -20,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
23
24
|
Classifier: Topic :: Software Development
|
24
25
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
25
26
|
Classifier: Topic :: Internet :: WWW/HTTP
|
@@ -42,7 +43,7 @@ Welcome to the [Ultralytics Actions](https://github.com/ultralytics/actions) rep
|
|
42
43
|
|
43
44
|
[](https://github.com/marketplace/actions/ultralytics-actions) [](https://github.com/ultralytics/actions/actions/workflows/format.yml) <a href="https://discord.com/invite/ultralytics"><img alt="Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a> <a href="https://community.ultralytics.com/"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a> <a href="https://reddit.com/r/ultralytics"><img alt="Ultralytics Reddit" src="https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue"></a>
|
44
45
|
|
45
|
-
[](https://badge.fury.io/py/ultralytics-actions) [](https://pepy.tech/
|
46
|
+
[](https://badge.fury.io/py/ultralytics-actions) [](https://www.pepy.tech/projects/ultralytics-actions)
|
46
47
|
|
47
48
|
## 📄 Actions Description
|
48
49
|
|
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/actions/update_markdown_code_blocks.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/ultralytics_actions.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
{ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/ultralytics_actions.egg-info/requires.txt
RENAMED
File without changes
|
{ultralytics_actions-0.0.10 → ultralytics_actions-0.0.22}/ultralytics_actions.egg-info/top_level.txt
RENAMED
File without changes
|