ultralytics-actions 0.0.55__py3-none-any.whl → 0.0.56__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 CHANGED
@@ -22,4 +22,4 @@
22
22
  # ├── test_summarize_pr.py
23
23
  # └── ...
24
24
 
25
- __version__ = "0.0.55"
25
+ __version__ = "0.0.56"
actions/summarize_pr.py CHANGED
@@ -44,8 +44,13 @@ def post_merge_message(pr_number, pr_url, repository, summary, pr_credit, header
44
44
  return response.status_code == 201
45
45
 
46
46
 
47
- def generate_issue_comment(pr_url, pr_summary, pr_credit):
48
- """Generates a personalized issue comment using based on the PR context."""
47
+ def generate_issue_comment(pr_url, pr_summary, pr_credit, pr_title=""):
48
+ """Generates personalized issue comment based on PR context."""
49
+ # Extract repo info from PR URL (format: api.github.com/repos/owner/repo/pulls/number)
50
+ repo_parts = pr_url.split("/repos/")[1].split("/pulls/")[0] if "/repos/" in pr_url else ""
51
+ owner_repo = repo_parts.split("/")
52
+ repo_name = owner_repo[-1] if len(owner_repo) > 1 else "package"
53
+
49
54
  messages = [
50
55
  {
51
56
  "role": "system",
@@ -54,13 +59,15 @@ def generate_issue_comment(pr_url, pr_summary, pr_credit):
54
59
  {
55
60
  "role": "user",
56
61
  "content": f"Write a GitHub issue comment announcing a potential fix for this issue is now merged in linked PR {pr_url} by {pr_credit}\n\n"
62
+ f"PR Title: {pr_title}\n\n"
57
63
  f"Context from PR:\n{pr_summary}\n\n"
58
64
  f"Include:\n"
59
65
  f"1. An explanation of key changes from the PR that may resolve this issue\n"
60
66
  f"2. Credit to the PR author and contributors\n"
61
67
  f"3. Options for testing if PR changes have resolved this issue:\n"
62
- f" - pip install git+https://github.com/ultralytics/ultralytics.git@main # test latest changes\n"
63
- f" - or await next official PyPI release\n"
68
+ f" - If the PR mentions a specific version number (like v8.0.0 or 3.1.0), include: pip install -U {repo_name}>=VERSION\n"
69
+ f" - Also suggest: pip install git+https://github.com/{repo_parts}.git@main\n"
70
+ f" - If appropriate, mention they can also wait for the next official PyPI release\n"
64
71
  f"4. Request feedback on whether the PR changes resolve the issue\n"
65
72
  f"5. Thank 🙏 for reporting the issue and welcome any further feedback if the issue persists\n\n",
66
73
  },
@@ -127,6 +134,7 @@ query($owner: String!, $repo: String!, $pr_number: Int!) {
127
134
  pullRequest(number: $pr_number) {
128
135
  closingIssuesReferences(first: 50) { nodes { number } }
129
136
  url
137
+ title
130
138
  body
131
139
  author { login, __typename }
132
140
  reviews(first: 50) { nodes { author { login, __typename } } }
@@ -150,6 +158,7 @@ query($owner: String!, $repo: String!, $pr_number: Int!) {
150
158
  comments = data["reviews"]["nodes"] + data["comments"]["nodes"]
151
159
  token_username = action.get_username() # get GITHUB_TOKEN username
152
160
  author = data["author"]["login"] if data["author"]["__typename"] != "Bot" else None
161
+ pr_title = data.get("title", "")
153
162
 
154
163
  # Get unique contributors from reviews and comments
155
164
  contributors = {x["author"]["login"] for x in comments if x["author"]["__typename"] != "Bot"}
@@ -173,7 +182,9 @@ query($owner: String!, $repo: String!, $pr_number: Int!) {
173
182
  pr_credit += (" with contributions from " if pr_credit else "") + ", ".join(f"@{c}" for c in contributors)
174
183
 
175
184
  # Generate personalized comment
176
- comment = generate_issue_comment(pr_url=data["url"], pr_summary=pr_summary, pr_credit=pr_credit)
185
+ comment = generate_issue_comment(
186
+ pr_url=data["url"], pr_summary=pr_summary, pr_credit=pr_credit, pr_title=pr_title
187
+ )
177
188
 
178
189
  # Update linked issues
179
190
  for issue in data["closingIssuesReferences"]["nodes"]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ultralytics-actions
3
- Version: 0.0.55
3
+ Version: 0.0.56
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=DJB5iF9yBtEKiORNXrvFFuRZKrAKH68c_98Wez8VoHs,742
1
+ actions/__init__.py,sha256=OsA1f_zloRyT6FbnRCGPxd76Cu-N-Vf5WReu9UDlbqY,742
2
2
  actions/first_interaction.py,sha256=1_WvQHCi5RWaSfyi49ClF2Zk_3CKGjFnZqz6FlxPRAc,17868
3
- actions/summarize_pr.py,sha256=sPKl6gN7HeGb9o9-QxVTnK2WZJW4iUytK6MApthn6HQ,11086
3
+ actions/summarize_pr.py,sha256=BKttOq-MGaanVaChLU5B1ewKUA8K6S05Cy3FQtyRmxU,11681
4
4
  actions/summarize_release.py,sha256=tov6qsYGC68lfobvkwVyoWZBGtJ598G0m097n4Ydzvo,8472
5
5
  actions/update_markdown_code_blocks.py,sha256=tUChNBIZN-B_unGMG9yQk-dohi7bit02Yl3xc4UtycQ,6610
6
6
  actions/utils/__init__.py,sha256=WStdEAYROVnF0nubEOmrFLrejkRiMXIefA5O1ckfcFs,476
7
7
  actions/utils/common_utils.py,sha256=PZkK9Wc3od34J9VSw4ICWHhQQC033o3DCrCy0VIyZE4,6024
8
8
  actions/utils/github_utils.py,sha256=-F--JgxtXE0fSPMFEzakz7iZilp-vonzLiyXfg0b17Y,7117
9
9
  actions/utils/openai_utils.py,sha256=qQbmrJpOUANxSMf7inDSgPIwgf0JHD1fWZuab-y2W6g,2942
10
- ultralytics_actions-0.0.55.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
- ultralytics_actions-0.0.55.dist-info/METADATA,sha256=9NPBdeMdAU7SaSY9VfYQY8KWIDI-6A0RS9vUL8rh82I,10561
12
- ultralytics_actions-0.0.55.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
13
- ultralytics_actions-0.0.55.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
14
- ultralytics_actions-0.0.55.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
15
- ultralytics_actions-0.0.55.dist-info/RECORD,,
10
+ ultralytics_actions-0.0.56.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
+ ultralytics_actions-0.0.56.dist-info/METADATA,sha256=lvqelxqPqg0UiVc-ocGZ6Dy884vQtnjxwlqHqW34AcQ,10561
12
+ ultralytics_actions-0.0.56.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
13
+ ultralytics_actions-0.0.56.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
14
+ ultralytics_actions-0.0.56.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
15
+ ultralytics_actions-0.0.56.dist-info/RECORD,,