ultralytics-actions 0.1.3__py3-none-any.whl → 0.1.4__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.

Potentially problematic release.


This version of ultralytics-actions might be problematic. Click here for more details.

actions/__init__.py CHANGED
@@ -23,4 +23,4 @@
23
23
  # ├── test_summarize_pr.py
24
24
  # └── ...
25
25
 
26
- __version__ = "0.1.3"
26
+ __version__ = "0.1.4"
@@ -196,7 +196,7 @@ def main(*args, **kwargs):
196
196
 
197
197
  if summary := response.get("summary"):
198
198
  print("Updating PR description with summary...")
199
- event.update_pr_description(number, SUMMARY_START + summary + "\n\n" + body)
199
+ event.update_pr_description(number, SUMMARY_START + summary)
200
200
  else:
201
201
  summary = body
202
202
 
actions/review_pr.py CHANGED
@@ -125,7 +125,7 @@ def generate_pr_review(repository: str, diff_text: str, pr_title: str, pr_descri
125
125
  ]
126
126
 
127
127
  try:
128
- response = get_completion(messages, reasoning_effort="medium")
128
+ response = get_completion(messages, reasoning_effort="medium", model="gpt-5-codex")
129
129
  print("\n" + "=" * 80 + f"\nFULL AI RESPONSE:\n{response}\n" + "=" * 80 + "\n")
130
130
 
131
131
  json_str = re.search(r"```(?:json)?\s*(\{.*?\})\s*```", response, re.DOTALL)
@@ -281,10 +281,10 @@ class Action:
281
281
  start = "## 🛠️ PR Summary"
282
282
  if start in description:
283
283
  print("Existing PR Summary found, replacing.")
284
- updated_description = description.split(start)[0] + new_summary
284
+ updated_description = description.split(start)[0].rstrip() + "\n\n" + new_summary
285
285
  else:
286
286
  print("PR Summary not found, appending.")
287
- updated_description = description + "\n\n" + new_summary
287
+ updated_description = (description.rstrip() + "\n\n" + new_summary) if description.strip() else new_summary
288
288
 
289
289
  self.patch(url, json={"body": updated_description})
290
290
  self._pr_summary_cache = new_summary
@@ -112,6 +112,7 @@ def get_completion(
112
112
  temperature: float = 1.0,
113
113
  reasoning_effort: str = None,
114
114
  response_format: dict = None,
115
+ model: str = OPENAI_MODEL,
115
116
  ) -> str | dict:
116
117
  """Generates a completion using OpenAI's Responses API based on input messages."""
117
118
  assert OPENAI_API_KEY, "OpenAI API key is required."
@@ -122,8 +123,8 @@ def get_completion(
122
123
 
123
124
  max_retries = 2
124
125
  for attempt in range(max_retries + 2):
125
- data = {"model": OPENAI_MODEL, "input": messages, "store": False, "temperature": temperature}
126
- if "gpt-5" in OPENAI_MODEL:
126
+ data = {"model": model, "input": messages, "store": False, "temperature": temperature}
127
+ if "gpt-5" in model:
127
128
  data["reasoning"] = {"effort": reasoning_effort or "low"}
128
129
  # GPT-5 Responses API handles JSON via prompting, not format parameter
129
130
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ultralytics-actions
3
- Version: 0.1.3
3
+ Version: 0.1.4
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>
@@ -64,8 +64,8 @@ Ultralytics Actions automatically applies formats, updates, and enhancements usi
64
64
  - **Spell Check:** Common misspellings are caught using [codespell](https://github.com/codespell-project/codespell).
65
65
  - **Broken Links Check:** Broken links in documentation and Markdown files are identified using [Lychee](https://github.com/lycheeverse/lychee).
66
66
  - **PR Summary:** Concise Pull Request summaries are generated using [OpenAI](https://openai.com/) GPT-5, improving clarity and review efficiency.
67
- - **PR Review:** AI-powered inline code reviews identify critical bugs, security issues, and code quality concerns with suggested fixes.
68
- - **Auto-labeling:** Relevant labels are applied to issues and pull requests via [OpenAI](https://openai.com/) GPT-5 for intelligent categorization.
67
+ - **PR Review:** AI-powered code reviews identify critical bugs, security issues, and code quality concerns with suggested fixes.
68
+ - **Auto-labeling:** Applies relevant labels to issues and PRs via [OpenAI](https://openai.com/) GPT-5 for intelligent categorization.
69
69
 
70
70
  ## 🛠️ How It Works
71
71
 
@@ -1,19 +1,19 @@
1
- actions/__init__.py,sha256=IF9iPWURzhUMPmmxX4U1ZDbR3ge59NOlQI6cxNZd4UI,772
1
+ actions/__init__.py,sha256=UDIRZMqICZj8MM9O1637KKavoMhRWu2lgE1IltT0m0s,772
2
2
  actions/dispatch_actions.py,sha256=8jaaVkA_LSlpUQ4tuzmQtf2kw3G09uVRD_LmJyXYKNE,4215
3
- actions/first_interaction.py,sha256=0GLJ-_kOPnEoOnoh5p_lEq_84emwlPsUduS-H0YFIFI,9868
4
- actions/review_pr.py,sha256=CAN0ZRj0AMRknMIqKoXNKayZvHuR4hlvxB2zi5O_HZA,14389
3
+ actions/first_interaction.py,sha256=8LxJ0RI4ddm-DjdD5tU1jAljCemP__tAc47nmSP8EdA,9852
4
+ actions/review_pr.py,sha256=hbk2y04tjtsizhgWrYi69btUy8yBdfnIUOe2bODTr28,14410
5
5
  actions/summarize_pr.py,sha256=XLYsNTf4J6VPyyecZcuiJaSBDgjDSWFj37v5vb1ATCA,5773
6
6
  actions/summarize_release.py,sha256=_067Q5AP-Zdnt_qzhHaCuGCr7T4MXSB5_N-M5GX6qgQ,9081
7
7
  actions/update_file_headers.py,sha256=E5fKYLdeW16-BHCcuqxohGpGZqgEh-WX4ZmCQJw2R90,6684
8
8
  actions/update_markdown_code_blocks.py,sha256=w3DTRltg2Rmr4-qrNawv_S2vJbheKE0tne1iz79FzXg,8692
9
9
  actions/utils/__init__.py,sha256=sKNx6o5jcAraEdGFph0o-YC7dMMY-dg_FprIBa6Jydw,1027
10
10
  actions/utils/common_utils.py,sha256=8ZmgaXZU3J2sg-HSaldp3hHYq7bI3akcJHdIXPmcNAo,11908
11
- actions/utils/github_utils.py,sha256=A84RXVVyqXjeKwxS9lKk9H_wAFyVX61sx_MtRYLxH5A,19634
12
- actions/utils/openai_utils.py,sha256=91ohkSlldVZt-icYcK7ZLfgQfnMbf4mTWT3nRnQ1QG4,10486
11
+ actions/utils/github_utils.py,sha256=mexywBlj4_eVuRFnh6-sXpnHTrAffoCUfeKidAqZwqA,19703
12
+ actions/utils/openai_utils.py,sha256=EIu7UQEYUatuU_sYQv-UxsIVveArMGHlpy4nXrI5Kl8,10503
13
13
  actions/utils/version_utils.py,sha256=EIbm3iZVNyNl3dh8aNz_9ITeTC93ZxfyUzIRkO3tSXw,3242
14
- ultralytics_actions-0.1.3.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
15
- ultralytics_actions-0.1.3.dist-info/METADATA,sha256=KxYk4OCpZA-_mgyfgJwh-aTrIO4i9MDIEj8I7LUa3Ho,12389
16
- ultralytics_actions-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
- ultralytics_actions-0.1.3.dist-info/entry_points.txt,sha256=n_VbDs3Xj33daaeN_2D72UTEuyeH8hVc6-CPH55ymkY,496
18
- ultralytics_actions-0.1.3.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
19
- ultralytics_actions-0.1.3.dist-info/RECORD,,
14
+ ultralytics_actions-0.1.4.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
15
+ ultralytics_actions-0.1.4.dist-info/METADATA,sha256=nsiw0RdHqqVa0-jbY4eI-cvFhOQlxzKkTyTOtxLYcrc,12368
16
+ ultralytics_actions-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ ultralytics_actions-0.1.4.dist-info/entry_points.txt,sha256=n_VbDs3Xj33daaeN_2D72UTEuyeH8hVc6-CPH55ymkY,496
18
+ ultralytics_actions-0.1.4.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
19
+ ultralytics_actions-0.1.4.dist-info/RECORD,,