ultralytics-actions 0.0.11__py3-none-any.whl → 0.0.12__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.11"
25
+ __version__ = "0.0.12"
actions/summarize_pr.py CHANGED
@@ -44,13 +44,16 @@ def generate_pr_summary(repo_name, diff_text):
44
44
  return SUMMARY_START + reply
45
45
 
46
46
 
47
- def update_pr_description(repo_name, pr_number, new_summary):
48
- """Updates the PR description with a new summary, replacing existing summary if present."""
49
- # Fetch the current PR description
47
+ def update_pr_description(repo_name, pr_number, new_summary, max_retries=2):
48
+ """Updates PR description with new summary, retrying if description is None."""
50
49
  pr_url = f"{GITHUB_API_URL}/repos/{repo_name}/pulls/{pr_number}"
51
- pr_response = requests.get(pr_url, headers=GITHUB_HEADERS)
52
- pr_data = pr_response.json()
53
- current_description = pr_data.get("body") or "" # warning, can be None
50
+ for i in range(max_retries + 1):
51
+ current_description = requests.get(pr_url, headers=GITHUB_HEADERS).json().get("body") or ""
52
+ if current_description:
53
+ break
54
+ if i < max_retries:
55
+ print("No current PR description found, retrying...")
56
+ time.sleep(1)
54
57
 
55
58
  # Check if existing summary is present and update accordingly
56
59
  if SUMMARY_START in current_description:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ultralytics-actions
3
- Version: 0.0.11
3
+ Version: 0.0.12
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=BR6hIdHQxSNou4yyfd_ejvst5RvcEVM_mbFpY5TAHTM,749
1
+ actions/__init__.py,sha256=L3pmTrt3LozcgsmGDc1D5KcKhSlqt5bbXvmymkWsJbs,749
2
2
  actions/first_interaction.py,sha256=cLXo5hmhOgTfk7F9LbGJeRdg6vvrKUe-0taCa_TkpAg,17683
3
- actions/summarize_pr.py,sha256=ysbGgomPXMXBZQQROWTv06syA59gJmGMvpWxDO66cLQ,3779
3
+ actions/summarize_pr.py,sha256=1NuDRT5C3kpOXWVripV9fo7z-qAV6eoeCJ-m3I3cpOE,3878
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
8
  actions/utils/github_utils.py,sha256=2H4pRum8tLSbLKGoO85Ea4E8psxZICyvFO_1hwQPuoU,5431
9
9
  actions/utils/openai_utils.py,sha256=SQWOjU3hdfI_0LKb3uqM5pNsoMyE7W0hGxXy7ISk97M,1823
10
- ultralytics_actions-0.0.11.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
- ultralytics_actions-0.0.11.dist-info/METADATA,sha256=shg13v42NZ7W9vaK1eE10mN8xgnoBp2-izjAl4FVpm4,10535
12
- ultralytics_actions-0.0.11.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
13
- ultralytics_actions-0.0.11.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
14
- ultralytics_actions-0.0.11.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
15
- ultralytics_actions-0.0.11.dist-info/RECORD,,
10
+ ultralytics_actions-0.0.12.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
11
+ ultralytics_actions-0.0.12.dist-info/METADATA,sha256=kc2-KDBjGEVunmP-k46P2jOBSPU-MnAr-PKDldyor0Y,10535
12
+ ultralytics_actions-0.0.12.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
13
+ ultralytics_actions-0.0.12.dist-info/entry_points.txt,sha256=GowvOFplj0C7JmsjbKcbpgLpdf2r921pcaOQkAHWZRA,378
14
+ ultralytics_actions-0.0.12.dist-info/top_level.txt,sha256=5apM5x80QlJcGbACn1v3fkmIuL1-XQCKcItJre7w7Tw,8
15
+ ultralytics_actions-0.0.12.dist-info/RECORD,,