ultralytics-actions 0.0.7__py3-none-any.whl → 0.0.8__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/utils/__init__.py +2 -0
- actions/utils/github_utils.py +43 -1
- {ultralytics_actions-0.0.7.dist-info → ultralytics_actions-0.0.8.dist-info}/METADATA +1 -1
- ultralytics_actions-0.0.8.dist-info/RECORD +15 -0
- {ultralytics_actions-0.0.7.dist-info → ultralytics_actions-0.0.8.dist-info}/entry_points.txt +1 -0
- ultralytics_actions-0.0.7.dist-info/RECORD +0 -15
- {ultralytics_actions-0.0.7.dist-info → ultralytics_actions-0.0.8.dist-info}/LICENSE +0 -0
- {ultralytics_actions-0.0.7.dist-info → ultralytics_actions-0.0.8.dist-info}/WHEEL +0 -0
- {ultralytics_actions-0.0.7.dist-info → ultralytics_actions-0.0.8.dist-info}/top_level.txt +0 -0
actions/__init__.py
CHANGED
actions/utils/__init__.py
CHANGED
@@ -14,6 +14,7 @@ from .github_utils import (
|
|
14
14
|
get_github_data,
|
15
15
|
get_pr_diff,
|
16
16
|
graphql_request,
|
17
|
+
ultralytics_actions_info,
|
17
18
|
)
|
18
19
|
from .openai_utils import OPENAI_API_KEY, OPENAI_MODEL, get_completion
|
19
20
|
|
@@ -34,4 +35,5 @@ __all__ = (
|
|
34
35
|
"OPENAI_MODEL",
|
35
36
|
"get_completion",
|
36
37
|
"check_pypi_version",
|
38
|
+
"ultralytics_actions_info",
|
37
39
|
)
|
actions/utils/github_utils.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# Ultralytics Actions 🚀, AGPL-3.0 license https://ultralytics.com/license
|
2
|
-
|
2
|
+
import json
|
3
3
|
import os
|
4
|
+
from pathlib import Path
|
4
5
|
|
5
6
|
import requests
|
6
7
|
|
@@ -85,3 +86,44 @@ def check_pypi_version(pyproject_toml="pyproject.toml"):
|
|
85
86
|
publish = True # publish as this is likely a first release
|
86
87
|
|
87
88
|
return local_version, online_version, publish
|
89
|
+
|
90
|
+
|
91
|
+
def ultralytics_actions_info():
|
92
|
+
"""Print Ultralytics Actions information."""
|
93
|
+
event_data = {}
|
94
|
+
if GITHUB_EVENT_PATH:
|
95
|
+
event_path = Path(GITHUB_EVENT_PATH)
|
96
|
+
if event_path.exists():
|
97
|
+
event_data = json.loads(event_path.read_text())
|
98
|
+
|
99
|
+
pr = event_data.get("pull_request", {})
|
100
|
+
pr_head_ref = pr.get("head", {}).get("ref")
|
101
|
+
|
102
|
+
info = {
|
103
|
+
"github.event_name": GITHUB_EVENT_NAME,
|
104
|
+
"github.event.action": event_data.get("action"),
|
105
|
+
"github.repository": REPO_NAME,
|
106
|
+
"github.event.pull_request.number": pr.get("number"),
|
107
|
+
"github.event.pull_request.head.repo.full_name": pr.get("head", {}).get("repo", {}).get("full_name"),
|
108
|
+
"github.actor": os.environ.get("GITHUB_ACTOR"),
|
109
|
+
"github.event.pull_request.head.ref": pr_head_ref,
|
110
|
+
"github.ref": os.environ.get("GITHUB_REF"),
|
111
|
+
"github.head_ref": os.environ.get("GITHUB_HEAD_REF"),
|
112
|
+
"github.base_ref": os.environ.get("GITHUB_BASE_REF"),
|
113
|
+
}
|
114
|
+
|
115
|
+
if GITHUB_EVENT_NAME == "discussion":
|
116
|
+
discussion = event_data.get("discussion", {})
|
117
|
+
info.update(
|
118
|
+
{
|
119
|
+
"github.event.discussion.node_id": discussion.get("node_id"),
|
120
|
+
"github.event.discussion.number": discussion.get("number"),
|
121
|
+
}
|
122
|
+
)
|
123
|
+
|
124
|
+
# Print information
|
125
|
+
max_key_length = max(len(key) for key in info.keys())
|
126
|
+
print("Ultralytics Actions Information " + "-" * 40) # header (72 long)
|
127
|
+
for key, value in info.items():
|
128
|
+
print(f"{key:<{max_key_length + 5}}{value}")
|
129
|
+
print("-" * 72) # footer
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ultralytics-actions
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.8
|
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=A_LmSMIFmzL2RxtVcz2ujcLzkH_yn98jqi1OU65iALg,748
|
2
|
+
actions/first_interaction.py,sha256=3xGCYjYM0Z8OYfvvHCMTVBevCb8gZV2DtuLaGIQtgIE,17617
|
3
|
+
actions/summarize_pr.py,sha256=5ya-rLD5va-1-AO146ZrgvSIpREZZTCsPY6eMArs8A0,3602
|
4
|
+
actions/summarize_release.py,sha256=Hv8GyIrfUxpia95QRYbYoNBfJ316l9IJdTPQZDIed-k,8310
|
5
|
+
actions/update_markdown_code_blocks.py,sha256=WBNcMD_KKsZS-qSPBn6O1G0ggQ_VrT-jTQffbg7xH_M,6369
|
6
|
+
actions/utils/__init__.py,sha256=KbtIL87s0j6Ad7RDRpRTIyxhxTQ1KL1yPjz5TkeUBYU,903
|
7
|
+
actions/utils/common_utils.py,sha256=zuGKef8po6hW7cQMPlrxhN9uTzoXbEb8feFO0q_mr70,3116
|
8
|
+
actions/utils/github_utils.py,sha256=uh9RGaDz6Mid0Pkt48ZGjeHpyaZNv8Wa2fPYQlledpA,5383
|
9
|
+
actions/utils/openai_utils.py,sha256=P_xyUX9x5rhNUj9kngrCCFrJgloPHe4a1LhRCobB-ig,1823
|
10
|
+
ultralytics_actions-0.0.8.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
11
|
+
ultralytics_actions-0.0.8.dist-info/METADATA,sha256=1Et4l1Ry8546Fzb3axMpEvhdNUgLGYL0xUP04TWC0ew,10534
|
12
|
+
ultralytics_actions-0.0.8.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
13
|
+
ultralytics_actions-0.0.8.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
|
14
|
+
ultralytics_actions-0.0.8.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
|
15
|
+
ultralytics_actions-0.0.8.dist-info/RECORD,,
|
{ultralytics_actions-0.0.7.dist-info → ultralytics_actions-0.0.8.dist-info}/entry_points.txt
RENAMED
@@ -1,5 +1,6 @@
|
|
1
1
|
[console_scripts]
|
2
2
|
ultralytics-actions-first-interaction = actions.first_interaction:main
|
3
|
+
ultralytics-actions-info = actions.utils:ultralytics_actions_info
|
3
4
|
ultralytics-actions-summarize-pr = actions.summarize_pr:main
|
4
5
|
ultralytics-actions-summarize-release = actions.summarize_release:main
|
5
6
|
ultralytics-actions-update-markdown-code-blocks = actions.update_markdown_code_blocks:main
|
@@ -1,15 +0,0 @@
|
|
1
|
-
actions/__init__.py,sha256=CGVVuKax1RTt6njhOvvF8wC74JpEIADTWL1M2wlXeeE,748
|
2
|
-
actions/first_interaction.py,sha256=3xGCYjYM0Z8OYfvvHCMTVBevCb8gZV2DtuLaGIQtgIE,17617
|
3
|
-
actions/summarize_pr.py,sha256=5ya-rLD5va-1-AO146ZrgvSIpREZZTCsPY6eMArs8A0,3602
|
4
|
-
actions/summarize_release.py,sha256=Hv8GyIrfUxpia95QRYbYoNBfJ316l9IJdTPQZDIed-k,8310
|
5
|
-
actions/update_markdown_code_blocks.py,sha256=WBNcMD_KKsZS-qSPBn6O1G0ggQ_VrT-jTQffbg7xH_M,6369
|
6
|
-
actions/utils/__init__.py,sha256=WM4ZRt6TLYxD2MHQtWObnIB3PoP8xsT0ToxGidejnJI,841
|
7
|
-
actions/utils/common_utils.py,sha256=zuGKef8po6hW7cQMPlrxhN9uTzoXbEb8feFO0q_mr70,3116
|
8
|
-
actions/utils/github_utils.py,sha256=fBkglc-XTFK6VDPuiwbqDE7iVamuuarE2qak5wx2Nh0,3771
|
9
|
-
actions/utils/openai_utils.py,sha256=P_xyUX9x5rhNUj9kngrCCFrJgloPHe4a1LhRCobB-ig,1823
|
10
|
-
ultralytics_actions-0.0.7.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
11
|
-
ultralytics_actions-0.0.7.dist-info/METADATA,sha256=UuntvHdlFajNMo_co8OuE4s9pjcC0D4xSpUrVvwsQd4,10534
|
12
|
-
ultralytics_actions-0.0.7.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
13
|
-
ultralytics_actions-0.0.7.dist-info/entry_points.txt,sha256=S8UXCzr5pW9tUAPck-gZTfdvX10a-gambB9wmFRWDnw,312
|
14
|
-
ultralytics_actions-0.0.7.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
|
15
|
-
ultralytics_actions-0.0.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|