From c025c87f0c35719454bb217d33da3f6b321e42b0 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 4 Jun 2026 13:15:34 +0800 Subject: [PATCH] Improve Actions docs and comment accuracy (follow-up) (#756) Signed-off-by: Glenn Jocher --- .github/workflows/cla.yml | 2 +- actions/__init__.py | 2 +- actions/review_pr.py | 2 +- actions/scan_prs.py | 2 +- actions/update_file_headers.py | 2 +- actions/utils/common_utils.py | 4 ++-- actions/utils/openai_utils.py | 2 +- cleanup-disk/README.md | 2 +- retry/README.md | 2 +- retry/action.yml | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 7781c13..152aff8 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -37,7 +37,7 @@ jobs: path-to-document: "https://docs.ultralytics.com/help/CLA" # CLA document # Branch must not be protected branch: cla-signatures - allowlist: dependabot[bot],github-actions,[pre-commit*,pre-commit*,bot* + allowlist: dependabot[bot],github-actions,pre-commit*,bot* remote-organization-name: ultralytics remote-repository-name: cla diff --git a/actions/__init__.py b/actions/__init__.py index a9a8bc1..c458853 100644 --- a/actions/__init__.py +++ b/actions/__init__.py @@ -29,4 +29,4 @@ # ├── test_summarize_pr.py # └── ... -__version__ = "0.2.14" +__version__ = "0.2.15" diff --git a/actions/review_pr.py b/actions/review_pr.py index db1dd77..4dc9f1d 100644 --- a/actions/review_pr.py +++ b/actions/review_pr.py @@ -430,7 +430,7 @@ def post_review_summary(event: Action, review_data: dict, review_number: int) -> comments = review_data.get("comments", []) summary = review_data.get("summary") or "" - # Don't approve if error occurred, inline comments exist, or critical/high severity issues + # Don't approve if error occurred, inline comments exist, or medium-or-higher severity issues has_error = not summary or ERROR_MARKER in summary has_inline_comments = review_data.get("comments_before_filtering", 0) > 0 has_issues = any(c.get("severity") not in ["LOW", "SUGGESTION", None] for c in comments) diff --git a/actions/scan_prs.py b/actions/scan_prs.py index 440e4ad..233c0ce 100644 --- a/actions/scan_prs.py +++ b/actions/scan_prs.py @@ -267,7 +267,7 @@ def run(): total_skipped += 1 summary.append(f"\n**Summary:** Found {total_found} | Merged {total_merged} | Skipped {total_skipped}") - print(f"\n📊 Dependabot Summary: Found {total_found} | Merged {total_merged} | Skipped {total_skipped}") + print(f"\n📊 Auto-Merge Summary: Found {total_found} | Merged {total_merged} | Skipped {total_skipped}") if summary_file := os.getenv("GITHUB_STEP_SUMMARY"): with open(summary_file, "a") as f: diff --git a/actions/update_file_headers.py b/actions/update_file_headers.py index fa04067..6adfa3f 100644 --- a/actions/update_file_headers.py +++ b/actions/update_file_headers.py @@ -176,7 +176,7 @@ def update_file(file_path, prefix, block_start, block_end, base_header): def main(*args, **kwargs): - """Automates file header updates for all files in the specified directory.""" + """Automates file header updates for supported file types under the current working directory.""" event = Action(*args, **kwargs) current_year = datetime.now().year repository = (event.repository or "").lower() diff --git a/actions/utils/common_utils.py b/actions/utils/common_utils.py index cda6299..321d6d5 100644 --- a/actions/utils/common_utils.py +++ b/actions/utils/common_utils.py @@ -11,7 +11,7 @@ from urllib import parse import requests -# Common directories to exclude when traversing file trees (used by docstring formatter, header updater, etc.) +# Common directories to exclude when traversing file trees (used by the Python docstring formatter) COMMON_EXCLUDED_DIRS = frozenset( { ".git", @@ -274,7 +274,7 @@ def clean_url(url): def allow_redirect(start="", end=""): - """Check if URL should be skipped based on simple rules.""" + """Check if a redirect target should be applied based on simple allow rules.""" start_lower = start.lower() end_lower = end.lower() return ( diff --git a/actions/utils/openai_utils.py b/actions/utils/openai_utils.py index ff92126..bde7c25 100644 --- a/actions/utils/openai_utils.py +++ b/actions/utils/openai_utils.py @@ -159,7 +159,7 @@ def _get_default_model() -> str: def get_review_model() -> str: - """Get model for PR reviews, using REVIEW_MODEL if set, otherwise default model.""" + """Get model for PR reviews, using REVIEW_MODEL if set, otherwise PR_REVIEW_MODEL_DEFAULT.""" return REVIEW_MODEL or PR_REVIEW_MODEL_DEFAULT diff --git a/cleanup-disk/README.md b/cleanup-disk/README.md index 55bc7ca..723e2bf 100644 --- a/cleanup-disk/README.md +++ b/cleanup-disk/README.md @@ -2,7 +2,7 @@ # 🧹 Disk Space Cleanup Action -Cleans up disk space on GitHub Actions runners by removing unnecessary tool caches and swap space. Frees up ~19GB total space. +Cleans up disk space on Ubuntu GitHub Actions runners by removing unnecessary tool caches and swap space. Frees up ~19GB total space. ## 🚀 Usage diff --git a/retry/README.md b/retry/README.md index 1a5e83a..0097f96 100644 --- a/retry/README.md +++ b/retry/README.md @@ -56,7 +56,7 @@ steps: | --------------------- | ------------------------------------------------------------ | -------- | ------------- | | `run` | Command to run | Yes | - | | `retries` | Number of retry attempts after initial run | No | `3` | -| `timeout_minutes` | Maximum total time in minutes for all attempts combined | No | `360` | +| `timeout_minutes` | Maximum total time in minutes, checked between attempts | No | `360` | | `retry_delay_seconds` | Base delay between retries in seconds | No | `10` | | `backoff` | Backoff strategy: `exponential` (base \* 2^n) or `fixed` | No | `exponential` | | `jitter` | Randomize delay to 80-120% of value to avoid thundering herd | No | `true` | diff --git a/retry/action.yml b/retry/action.yml index 9579ee9..83fc6bc 100644 --- a/retry/action.yml +++ b/retry/action.yml @@ -26,7 +26,7 @@ name: "Step-Level Retry" description: "Retries a step while preserving its full context" inputs: timeout_minutes: - description: "Maximum total time in minutes for all attempts" + description: "Maximum total time in minutes for all attempts (checked between attempts; does not interrupt a running attempt)" required: false default: "360" retries: