Releases: ultralytics/actions
v0.2.8 - New format Markdown string function (#663)
๐ Summary
Ultralytics Actions v0.2.8 focuses on smarter, cleaner automation: better AI-powered PR reviews, richer GitHub issue templates, and powerful markdown/code formatting tools for both files and in-memory strings. โจ
๐ Key Changes
-
๐งฉ New markdown string formatter (core of this release)
- Added
process_markdown_string(...)to format Python and Bash code blocks inside in-memory markdown strings, not just files. - Reuses existing formatting logic (
process_markdown_file,format_code_with_ruff,format_bash_with_prettier,update_markdown_file) for consistent behavior. - Safely handles temp files via
tempfile.TemporaryDirectory()so nothing is written permanently.
- Added
-
๐ค Smarter, more focused AI PR reviews
- Switched review generation to the
gpt-5.1-codexmodel for better code understanding. - Introduced
should_skip_file()and refined skip patterns to avoid generated/minified/irrelevant files. - Added safeguards:
- Ignore non-file paths and files larger than 100 KB.
- Limit file content to a 5,000-character snippet, with a clear
... (truncated)marker.
- Added prompt controls:
- Uses a conservative token budget estimate to stay under
MAX_PROMPT_CHARS. - Caps inline review comments at
MAX_REVIEW_COMMENTS = 8. - Sorts comments by severity, then file, then line number using
SEVERITY_RANK.
- Uses a conservative token budget estimate to stay under
- Improves GitHub API usage for reviews and comments:
- Proper pagination (
?per_page=100) for reviews and comments. - Correct delete endpoint for inline comments (
/pulls/comments/{id}). - More robust HTTP status handling: only treat unexpected status codes as hard errors.
- Proper pagination (
- Adds detailed debug logging (system and user prompts) specifically when running in
ultralytics/actionsfor easier troubleshooting.
- Switched review generation to the
-
๐งน Consistent Prettier formatting at 120 characters
- Updated
action.ymlandupdate_markdown_code_blocks.pyso Prettier runs with--print-width 120for:- JS/TS, CSS, JSON, YAML, HTML, Vue, Svelte, etc.
- Shell scripts via
prettier-plugin-sh. - Markdown files (including docs, with existing
--tab-width 4preserved).
- Ensures generated shell code blocks in markdown also use the 120-character width.
- Updated
-
๐งญ Cleaner URL handling & GitHub client refactor
- Simplified
clean_url()to more reliably strip quotes, trailing punctuation,.git@main, andgit+, including nested cases. - Refactored
GitHubClientto parse and storeownerandrepo_nameonce, then reuse them in:is_org_memberget_label_ids(GraphQL)block_userget_pr_contributors
- Improved HTTP request handling:
- Separates โstatus is expectedโ from โstatus is successfulโ.
- Only raises errors when status is unexpected, not just because itโs 4xx, making workflows more resilient.
- Simplified
-
๐ New GitHub issue templates & support links
- Added structured Bug Report, Feature Request, and Question templates under
.github/ISSUE_TEMPLATE/. - Each template guides users to provide context, logs, environment details, and minimal repro examples.
- Introduced shared
config.ymlwith quick links to:- ๐ Ultralytics Docs
- ๐ฌ Ultralytics Community Forum
- ๐ง Ultralytics Discord
- โจ๏ธ Ultralytics Subreddit
- Added structured Bug Report, Feature Request, and Question templates under
-
๐ข Version bump
actions/__init__.pyversion updated from0.2.7to0.2.8.
๐ฏ Purpose & Impact
-
๐ Easier programmatic docs & content generation
process_markdown_string(...)lets you format markdown that lives purely in memory (e.g., generated docs, bot comments, PR descriptions) without touching the filesystem.- Ensures Python and Bash code blocks are consistently formatted whether they come from files or are dynamically generated.
-
๐ค Higher-quality, more reliable PR reviews
- Using
gpt-5.1-codexshould improve code understanding and the relevance of automated feedback. - Smarter file skipping, size limits, and content truncation keep the AI focused on meaningful changes and avoid wasting tokens on noise.
- Comment capping, severity-based sorting, and concise-guidance produce fewer but higher-value review comments, making them easier for maintainers to act on.
- More robust API handling reduces flaky failures and edge cases when dismissing old reviews or deleting previous comments.
- Using
-
๐ Cleaner, more readable code and docs
- A unified 120-character line width across JS/TS, shell scripts, and markdown reduces wrapping noise and makes diffs easier to review.
- Consistent formatting across CI, local runs, and doc-generation tools leads to more predictable outputs and fewer formatting-only PR changes.
-
๐งฑ Stronger infrastructure for automation
- Refined URL cleaning avoids broken or malformed links in generated content and summaries.
- Centralized repo owner/name handling simplifies future integrations with GitHub APIs and reduces subtle bugs.
- Clearer error semantics (expected vs. unexpected statuses) help workflows fail less often while still surfacing true misconfigurations.
-
๐ Better support and community interaction
- Structured issue templates help users provide the right information the first time, making it faster to reproduce and fix problems.
- Direct links to docs and community channels encourage self-help and discussion, reducing friction for both users and maintainers.
Overall, v0.2.8 makes Ultralytics Actions more developer-friendly, more robust in CI, and better suited for automated documentation and review workflows. ๐ผโจ
What's Changed
- Guard large files in PR Reviews by @glenn-jocher in #652
- PR Review improvements by @glenn-jocher in #653
- Add owner and repo_name properties to Actions object by @glenn-jocher in #656
- Fix delete comments by @glenn-jocher in #657
- Add Issue templates by @glenn-jocher in #658
- Prettier 120 line width by @glenn-jocher in #659
- Update update_markdown_code_blocks.py to 120 print width by @glenn-jocher in #660
- Update review_pr.py by @glenn-jocher in #661
- New format Markdown string function by @glenn-jocher in #663
Full Changelog: v0.2.7...v0.2.8
v0.2.7 - New `gpt-5.1-2025-11-13` model (#651)
๐ Summary
v0.2.7 standardizes all OpenAI model references to gpt-5.1-2025-11-13 for more consistent, higher-quality reviews and accurate cost tracking across the action โ๏ธ๐ค
๐ Key Changes
- Default model updated to gpt-5.1-2025-11-13 in action inputs and utilities
action.yml:openai_modeldefault โ gpt-5.1-2025-11-13actions/utils/openai_utils.py:OPENAI_MODELdefault โ gpt-5.1-2025-11-13
- PR review generation now uses gpt-5.1-2025-11-13 by default (still notes gpt-5-codex as an alternative)
- Cost map updated: added gpt-5.1-2025-11-13, removed gpt-5-2025-08-07 for accurate billing estimates
- Version bump: 0.2.6 โ 0.2.7
See PR: New gpt-5.1-2025-11-13 model (#651) by @glenn-jocher
๐ฏ Purpose & Impact
- Better defaults out of the box ๐: Aligns reviews and tools on a single, newer model for improved reasoning and consistency.
- Accurate cost tracking ๐ธ: MODEL_COSTS now reflects the new default, helping teams estimate usage reliably.
- Non-breaking upgrade โ : Minor version bump indicates safe adoption with improved behavior.
- Clear configuration paths ๐ง: Users can still override the model via action input or environment variable.
Example usage:
# Override in workflow if needed
- uses: ultralytics/[email protected]
with:
openai_model: gpt-5.1-2025-11-13Or set environment variable:
export OPENAI_MODEL=gpt-5.1-2025-11-13What's Changed
- New
gpt-5.1-2025-11-13model by @glenn-jocher in #651
Full Changelog: v0.2.6...v0.2.7
v0.2.6 - Optimize citation removal in sanitize_ai_text (#650)
๐ Summary
Faster, cleaner PR review outputs: v0.2.6 optimizes AI text sanitization with a precompiled regex and standardizes its use across the workflow. โก๐งผ
๐ Key Changes
- Optimized citation removal in
sanitize_ai_textusing a precompiled regex pattern for better performance (Optimize citation removal in sanitize_ai_text โ PR #650 by @glenn-jocher). - Centralized AI text sanitization into a shared utility and exported it for reuse (Refactor sanitize_ai_text() โ PR #649 by @glenn-jocher).
- Updated PR review generation to use the shared
sanitize_ai_text, ensuring consistent cleaning of AI outputs. - Safer handling of empty or None inputs in sanitization to avoid edge-case errors.
- Version bump:
0.2.5โ0.2.6.
๐ฏ Purpose & Impact
- Performance boost: Avoids recompiling regex on every call, improving speed in hot paths. ๐
- Cleaner outputs: Removes leaked AI citation tokens (e.g., internal tool refs) for more readable PR reviews. ๐งฝ
- Consistency: One shared sanitization utility used across actions reduces duplication and drift. ๐งฉ
- Reliability: Better handling of empty inputs prevents unexpected crashes or noisy logs. ๐ก๏ธ
- Maintainability: A single, precompiled pattern is easier to update and test. ๐ ๏ธ
Quick usage example:
from actions.utils import sanitize_ai_text
text = "Please cite turn3search5 for details."
clean = sanitize_ai_text(text) # -> "Please for details."What's Changed
- Refactor sanitize_ai_text() by @glenn-jocher in #649
- Optimize citation removal in sanitize_ai_text by @glenn-jocher in #650
Full Changelog: v0.2.5...v0.2.6
v0.2.5 - List skipped PR Review files (#648)
๐ Summary
v0.2.5 sharpens PR review quality and speeds up CI by making skipped files explicit, skipping minified assets in formatting, hardening text sanitization, and aligning tooling to Python 3.9. ๐
๐ Key Changes
- PR reviews: Show actual skipped files, not just a count
- Tracks and returns a
skipped_fileslist and renders an expandable list in the review summary for transparency. See PR List skipped PR Review files (#648) โจ
- Tracks and returns a
- Prettier: Skip minified assets to avoid noisy diffs and speed up CI
- Ignores
**/*.min.jsand**/*.min.cssinaction.yml. See PR Prettier skip minified files (#647) โก
- Ignores
- Text sanitizer: Fix corrupted AI citation markers (Unicode private-use area)
- More robust regex to strip AI tool citations without artifacts. See PR Fix Unicode citation marker corruption (#644) ๐งน
- Python baseline: Align to Python 3.9 across configs
- Set
requires-python >=3.9, update Ruff target topy39, and adjust CI matrix. See PR Align Python 3.9 requirement (#643) ๐
- Set
- Link checker: Bump lychee action
- Upgrade to
lycheeverse/[email protected]. See PR Bump lycheeverse/lychee-action to 2.7.0 (#641) ๐
- Upgrade to
- CLI docs and header updater refinement
- Clearer
parse_cli()docstring and simpler header-update flow without behavior change. See PR Update parse_cli docstring (#646) ๐
- Clearer
- Code quality refactor
- Cleaner control flow, safer docstring wrapping, and simplified diff parsing/review logic. See PR Refactor Python (#645) ๐ง
- Docstring normalization
- Map "Example Usage"โ"Examples" and "Reference"โ"References" for consistency. See PR Add "Example Usage" to formatter (#640) ๐
- Version bump
__version__updated to0.2.5.
๐ฏ Purpose & Impact
- Greater PR review transparency and trust โ
- Reviewers can see exactly which files were skipped (lock/minified/images, etc.), improving auditability and debugging.
- Faster, cleaner CI and diffs ๐
- Skipping minified files reduces processing time and avoids noisy or risky formatting changes.
- More reliable automated comments ๐ก๏ธ
- Fixed Unicode-related citation artifacts in AI-generated reviews for cleaner outputs.
- Consistent tooling and environment ๐
- Standardizing on Python 3.9 simplifies linting, formatting, and CI behavior.
- Better contributor experience ๐งญ
- Clearer CLI docs, normalized docstring headers, and refactored utilities make contributions smoother.
Overall, v0.2.5 focuses on clarity, speed, and consistencyโmaking reviews more informative and CI more efficient. ๐
What's Changed
- Add "Example Usage" to format_python_docstrings.py by @glenn-jocher in #640
- Fix Unicode citation marker corruption in PR reviews by @fcakyon in #644
- Bump lycheeverse/lychee-action from 2.6.1 to 2.7.0 by @dependabot[bot] in #641
- Align Python 3.9 requirement across all configs by @fcakyon in #643
- Refactor Python by @glenn-jocher in #645
- Prettier skip minified files by @glenn-jocher in #647
- Update
parse_clidocstring by @glenn-jocher in #646 - List skipped PR Review files by @glenn-jocher in #648
Full Changelog: v0.2.4...v0.2.5
v0.2.4 - Enable new Ultralytics Google-style docstring formatter (#637)
๐ Summary
v0.2.4 turns on our new Googleโstyle Python docstring formatter by default, delivers faster and smarter docstring formatting, and makes AI PR reviews cleaner and more accurate. โจโก
๐ Key Changes
- New formatter enabled by default
- The Python docstring formatter now runs by default in the Action (
python_docstrings: true) for consistent, high-quality docs across repos. See PR Enable new Ultralytics Google-style docstring formatter (#637). โ
- The Python docstring formatter now runs by default in the Action (
- Faster, safer, style-aware docstring formatting
- Parallel processing for speed, smarter file discovery (skips venv/cache/build dirs), and robust wrapping of lists, code fences, tables, and preformatted blocks. Preserves non-Google styles (NumPy, reST, Epydoc) without touching them. See PR Parallelize docstring formatter (#635). โก๐ก๏ธ
- Cleaner list formatting by correctly joining continuation lines, reducing awkward breaks and noisy diffs. See PR Fix docstrings tail calculation (#636). ๐งน
- New CLI flags:
--check,--line-width=120,--start-newlinefor summary placement control. ๐งฐ
- Cleaner AI PR reviews
- Removes leaked tool-citation tokens from AI output for professional, user-facing reviews. See PR Sanitize PR Review web output (#634). ๐งฝ
- Hunk-aware diff parsing ensures comments/suggestions attach to the correct lines; stricter validation for multi-line ranges and suggestions. See PR Fix different hunks bug for PR Review (#639). ๐ฏ
๐ฏ Purpose & Impact
- Consistent, readable docs by default
- Turning the formatter on by default standardizes Python docstrings across projects, improving readability and maintainability. ๐
- Faster CI and fewer noisy diffs
- Parallel processing and smarter wrapping reduce CI time and minimize unnecessary changes in PRs. ๐
- Better contributor experience
- PR reviews are cleaner, clearer, and precisely aligned to diffsโreducing confusion and rework. โ
- Flexible control when needed
- Easily check or enforce formatting locally or in CI with simple flags, and disable via input if your repo requires it. ๐ง
Example usage:
- Run a check locally (no changes):
python actions/format_python_docstrings.py --check --line-width=120 . - Force summary to start on a new line:
python actions/format_python_docstrings.py --start-newline path/to/file.py
- Disable in your workflow if needed:
with: python_docstrings: "false"
Thanks to @UltralyticsAssistant and @glenn-jocher for the improvements! ๐
What's Changed
- Sanitize PR Review web output by @glenn-jocher in #634
- Parallelize docstring formatter by @glenn-jocher in #635
- Fix docstrings tail calculation by @glenn-jocher in #636
- Fix different hunks bug for PR Review by @glenn-jocher in #639
- Enable new Ultralytics Google-style docstring formatter by @UltralyticsAssistant in #637
Full Changelog: v0.2.3...v0.2.4
v0.2.3 - Add Python 3.14 support (#633)
๐ Summary
Python 3.14 support lands in CI and packaging metadata, ensuring Ultralytics Actions stay future-ready and compatible with the latest Python releases. ๐
๐ Key Changes
- โ CI updated to test on Python 3.14 (replacing 3.13) across ubuntu-latest and macos-latest runners; Windows remains excluded.
- ๐ท๏ธ Packaging metadata updated to include Python 3.14 in
pyproject.tomlclassifiers. - ๐ข Version bump to
0.2.3.
Primary PR: Add Python 3.14 support by @glenn-jocher โ see the details in the PR: Add Python 3.14 support (PR #633).
๐ฏ Purpose & Impact
- ๐ Early validation on Python 3.14 to catch ecosystem or dependency issues before they affect users.
- ๐ง Improves reliability of Ultralytics Actions for teams upgrading to Python 3.14.
- ๐ก๏ธ No breaking changes or behavior differencesโsafe update for all users.
- ๐๏ธ Reduces technical debt and keeps CI aligned with the latest Python versions.
Tip: If you want to pin your own workflows to Python 3.14, update your GitHub Actions matrix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.14"]What's Changed
- Add Python 3.14 support by @glenn-jocher in #633
Full Changelog: v0.2.2...v0.2.3
v0.2.2 - Update publish.yml
๐ Summary
Ultralytics Actions v0.2.2 is a focused patch release that introduces a fast, built-in Google-style Python docstring formatter, upgrades AI responses to structured JSON via a new API, and delivers cleaner, safer PR scanning and reviewing workflows โ topped off with a version bump. โจ
๐ Key Changes
-
๐ฆ Version bump
- Bumped package to 0.2.2 in
actions/__init__.pyvia Google Docstring formatter (PR #631) by @glenn-jocher.
- Bumped package to 0.2.2 in
-
๐ง AI API upgrade with structured outputs
- Replaced legacy
get_completionwithget_responseacross the codebase; adds JSON Schema-enforced outputs for reliability via Use JSON schema (PR #629). - PR Reviews now:
- Use
gpt-5-codexwith low reasoning. - Return strict JSON Schema objects (comments + summary) โ no more fragile regex parsing.
- Improve error logging with full API response bodies.
- Use
- PR Open responses now return a strict JSON object for
summary,labels, andfirst_comment.
- Replaced legacy
-
โ๏ธ New Google-style Python docstring formatter
- Added an Ultralytics-built formatter with CLI
ultralytics-actions-format-python-docstringsand Action inputpython_docstringsvia New Google Python Docstring formatter (PR #630). - Replaces
docformatter(dependency and config removed). - Integrated into:
- Main formatting workflow (
format.yml:python: true,python_docstrings: true/false). - Markdown code block formatter.
- Main formatting workflow (
- README updated to document optional docstring formatting.
- Minimal workflow example:
- uses: ultralytics/[email protected] with: python: true # Ruff python_docstrings: true # Ultralytics formatter prettier: true
- Added an Ultralytics-built formatter with CLI
-
๐ Smarter, safer PR scanning
- Supports multi-visibility inputs (e.g.,
private,internal) and preservesall; enforces security to restrict public runners to public repos only via Scan PRs cleanup (PR #626). - Accurate PR counts and cleaner summaries (X/Y repos scanned, simplified phase labels) via Scan PRs cleanup (PR #624) and Fix total PRs count (PR #627).
- More robust status-check handling via a dedicated helper.
- Workflow token simplified to GitHubโs default
GITHUB_TOKENvia Update scan-prs.yml (PR #625).
- Supports multi-visibility inputs (e.g.,
-
๐งโโ๏ธ Better PR reviews with more context
- Action now also triggers on
review_requested. - Optionally pulls safe full-file content (up to 10 files, within token budget) to reduce false positives via Add full-file context (PR #628).
- Prompts clarify that web search is available.
- Action now also triggers on
-
๐ ๏ธ Workflow and tooling updates
publish.ymlupdated to use Python 3.13.- New Action input:
python_docstrings(default: false) added toaction.yml. - Tests updated to reflect API rename (
get_response). - Docs updated to show comma-separated visibility for scan-prs and security note.
๐ฏ Purpose & Impact
- Consistent docs at speed โก
- Enforces clean, Google-style docstrings with an Ultralytics-native tool; faster CI and simpler tooling (no external docformatter).
- Reliable automation ๐ค
- JSON Schema outputs eliminate brittle parsing; easier integration for bots, dashboards, and CI consumers.
- Higher-quality reviews ๐งช
- More timely and context-aware AI reviews reduce false positives and improve actionable feedback.
- Safer org-wide scans ๐
- Security-aware visibility controls and robust status checks mean fewer surprises and clearer reporting.
- Low risk, easy adoption โ
- Mostly additive changes. If you previously relied on
docformatter, switch to the newpython_docstringsinput and CLI. - Maintainers: verify workflows use
GITHUB_TOKENand togglepython_docstringsas desired.
- Mostly additive changes. If you previously relied on
Overall, v0.2.2 tightens reliability, consistency, and security across formatting, PR scanning, and AI-powered reviews โ with minimal disruption. ๐
What's Changed
- Scan PRs cleanup by @glenn-jocher in #624
- Update scan-prs.yml for default token by @glenn-jocher in #625
- Scan PRs cleanup by @glenn-jocher in #626
- Fix scan_prs.py total PRs count by @glenn-jocher in #627
- Add full-file context by @glenn-jocher in #628
- Use JSON schema by @glenn-jocher in #629
- New Google Python Docstring formatter by @glenn-jocher in #630
- Google Docstring formatter by @glenn-jocher in #631
Full Changelog: v0.2.1...v0.2.2
v0.2.1 - New scan PRs action (#623)
๐ Summary
v0.2.1 introduces a new Scan PRs composite action that centralizes org-wide PR visibility and safely auto-merges eligible Dependabot updates, plus smarter PR reviews (with web search), stronger linting, and more reliable CI tooling. ๐
๐ Key Changes
- New Scan PRs action and workflow ๐ค๐
- Replaces the legacy โList Open PRsโ workflow with a reusable composite action that scans PRs across the org and auto-merges safe Dependabot GitHub Actions PRs
- Includes age-based PR phases (New/Green/Yellow/Red) in step summaries for quick triage
- Adds docs and inputs for org/visibility controls and safety checks
- PR: New Scan PRs action (#623) by @glenn-jocher โข Scan PRs docs
- Web-backed PR reviews (domain-filtered) ๐โ
- Adds a constrained web search tool to PR reviews for real-time lookups, limited to trusted domains (ultralytics.com, github.com, stackoverflow.com)
- PR: Add web search for PR reviews (#613) by @fcakyon
- Stronger, more consistent linting ๐งน
- Align CI/local Ruff: extend-select includes RUF and FA; synced ignores
- PRs: Enhance Ruff config (#608) by @onuralpszr
- Safer auto-format guardrail ๐
- Prevents recursive loops by checking the last two commits and fixing a grep edge case; increases fetch-depth to 2
- PRs: Allow 2 successive commits in PRs (#609), Fix MATCH_COUNT grep bug (#614) by @glenn-jocher
- Better spelling signal โ
- Improves codespell accuracy (built-ins, UKโUS), expands ignore list, and skips webp/avif images
- PR: Add British English to codespell (#615) by @glenn-jocher
- More reliable auth in formatting workflow ๐
- Switches fallback from secrets.GITHUB_TOKEN to github.token
- PR: Update format.yml (#612) by @glenn-jocher
- Dependency hygiene and cadence ๐ฆ
- Dependabot schedule from monthly โ weekly (pip and GitHub Actions)
- PR: Update dependabot.yml (#616) by @glenn-jocher
- Bumps: upload-artifact v5 (#618, #620), download-artifact v6 (#617, #619)
- Documentation refresh ๐
- README restructured to highlight main action, standalone actions (including Scan PRs), and Python package usage
๐ฏ Purpose & Impact
- Centralize and automate PR ops across the org โ๏ธ
- Reduces manual triage by summarizing all open PRs with aging indicators
- Safely auto-merges Dependabot PRs to keep workflows current with minimal human effort
- Smarter, faster reviews with trusted context ๐ง
- Web search (domain-filtered) helps reviewers validate information and references without leaving the PR
- Higher code quality with fewer surprises โ
- Stronger lint rules and improved spell checking surface issues earlier and reduce PR churn
- More reliable CI with safer defaults ๐
- Better token fallback reduces auth-related failures
- Loop-preventing auto-format guard avoids endless runs and noisy histories
- Quicker dependency updates, smaller diffs โฑ๏ธ
- Weekly Dependabot cadence improves security posture and keeps Actions up-to-date
Tip: To adopt the new PR scanning, add the reusable workflow step:
- uses: ultralytics/actions/scan-prs@main
with:
token: ${{ secrets._GITHUB_TOKEN }}What's Changed
- ci(formatter): enhance Ruff configuration by adding RUF to extend-select and updating ignore list in toml by @onuralpszr in #608
- Allow 2 successive commits in PRs by @glenn-jocher in #609
- Add explicit username to first interaction by @glenn-jocher in #611
- Update format.yml by @glenn-jocher in #612
- Fix
MATCH_COUNTgrep bug by @glenn-jocher in #614 - Add British english to codespell by @glenn-jocher in #615
- Update dependabot.yml by @glenn-jocher in #616
- Bump actions/upload-artifact from 4 to 5 in /.github/workflows by @dependabot[bot] in #618
- Bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #620
- Add web search for PR reviews by @fcakyon in #613
- Bump actions/download-artifact from 5 to 6 by @dependabot[bot] in #619
- Bump actions/download-artifact from 5 to 6 in /.github/workflows by @dependabot[bot] in #617
- New scan PRs action by @glenn-jocher in #623
Full Changelog: v0.2.0...v0.2.1
v0.2.0 - Workflow dispatch from PR forks (#607)
๐ Summary
Ultralytics Actions v0.2.0 focuses on reliable CI for forked PRs by creating temporary branches in the base repo, safer API handling, and clearer review/summary messagingโplus multiple robustness and observability upgrades. ๐
๐ Key Changes
- CI for forked PRs (priority)
- Creates a real temp branch in the base repo via git operations, then dispatches workflows from it; always cleans up. ๐๐งน
- Waits longer (60s) for workflows to appear and sanitizes error logs to avoid token leakage. โฑ๏ธ๐
- Refined CI comment formatting for clearer feedback.
- Safer GitHub API handling
- Treats 204 (No Content) as success for GET/POST to reduce false failures. โ
- More informative error printing (includes details when present).
- Version bump
__version__โ 0.2.0.
- Install source change
- Default install now pulls from GitHub main instead of PyPI to keep the action up to date. ๐
- Linting updates
- Adds Pyflakes checks (
F) to Ruff for catching undefined names and unused imports. ๐งน - Briefly enabled Ruffโs native rules (
RUF) then reverted to reduce noise.
- Adds Pyflakes checks (
- OpenAI reliability and visibility
- Smarter retries for 5xx and JSON parsing errors; improved timeout strategy (30s connect, 900s read). ๐โฑ๏ธ
- Logs token usage, reasoning tokens, latency, and estimated cost per call. ๐ธ๐
- Increased character limits (up to 3000) for prompts, summaries, and comments to reduce truncation. โ๏ธ
- Loop prevention improvement
- Prevents recursive auto-format commits by checking the exact commit message instead of the author. ๐โ
- Consistency and cleanup
- Centralized branding credit, standardized headers, and modernized type hints.
- Refactors/tests updated to match the new fork/temp-branch flow and utilities.
Links:
- Current PR: Workflow dispatch from PR forks (#607)
- Ultralytics Actions: Ultralytics Actions website
๐ฏ Purpose & Impact
- More reliable CI for forks
- Ensures forked PRs are testable by creating a temp branch in the base repo and dispatching from there. Fewer missed CI runs. ๐ง
- Improved security and safety
- Sanitizes git errors, avoids exposing secrets, and treats 204 status codes correctly to minimize false negatives. ๐ก๏ธ
- Better developer experience
- Clearer CI comments and PR review summaries; richer, less truncated AI feedback. โจ
- Greater observability and cost control
- Transparent token, cost, and latency metrics enable better model selection and budgeting. ๐ก๐ฐ
- Stricter code quality without breaking builds
- Added Pyflakes checks catch common issues while keeping lint non-blocking. ๐งน๐ฆ
- Faster access to fixes
- Installing from GitHub main delivers the latest improvements sooner (with a small trade-off in reproducibility). โก
Notes for users:
- Requires a valid
GITHUB_TOKENwith permission to push temp branches to the base repository for forked PR CI. ๐ - Expect slightly longer waits before CI links appear due to the 60s startup buffer. โณ
- Logs may be larger due to expanded summaries and usage reporting. ๐งพ
What's Changed
- Update action.yml by @glenn-jocher in #586
- Minor PR Review improvements by @glenn-jocher in #587
- Improve prompt to not avoid suggestions by @glenn-jocher in #588
- Print token counts and costs by @glenn-jocher in #589
- Install
.prettierrcplugins by @glenn-jocher in #593 - Revert "Install
.prettierrcplugins" by @glenn-jocher in #594 - Simplify LLM retry by @glenn-jocher in #595
- Ruff extend-select F by @glenn-jocher in #596
- Update OpenAI timeout to (30, 900) by @glenn-jocher in #597
- Clip review comments at 3000 characters by @glenn-jocher in #598
- Update action.yml with
--extend-select RUFby @glenn-jocher in #600 - Revert "Update action.yml with
--extend-select RUF" by @glenn-jocher in #601 - Update action.yml with
LAST_MESSAGEby @glenn-jocher in #602 - Ruff RUF by @glenn-jocher in #603
- Catch JSONDecodeErrors by @glenn-jocher in #604
- Ruff refactor by @glenn-jocher in #599
- Run dispatch fork requests on temp branches by @glenn-jocher in #605
- Workflow dispatch from PR forks by @glenn-jocher in #607
Full Changelog: v0.1.9...v0.2.0
v0.1.9 - Explicit diff line numbers (#584)
๐ Summary
v0.1.9 makes PR reviews more accurate and reliable by adding explicit R/L line numbers to diffs, tightening comment validation, and improving CI workflows and OpenAI error handling. ๐ฏ๐งญ
๐ Key Changes
- Precision diffing and reviews (priority: latest PR)
- Adds explicit R/L line-number prefixes to diffs for unambiguous inline comments. See PR #584: Explicit diff line numbers by @glenn-jocher. ๐งญ
parse_diff_files()now returns (file mapping, augmented diff) and the augmented diff is used in prompts and truncation logic.- Review prompts instruct the AI to reference R/L-prefixed numbers and to match the correct
sidefield. - Example of augmented diff lines:
R 123 +new code line L 45 -removed code line unchanged context
- Safer, more predictable review logic
- Skips comments with ambiguous or invalid line references; no auto-switching sides. See PR #583: Improve line number logic. ๐ก๏ธ
- Always removes suggestions on LEFT (removed) lines to avoid GitHub rejections.
- Cleans up noisy logs and minor whitespace in workflows.
- Cleaner reviews and sturdier OpenAI retries
- Trims review bodies before submission and makes server-error retries safer. See PR #582: Fix OpenAI retry logic. ๐๐งฝ
- Ensures proper status code handling when HTTP errors lack a response object.
- Easier org-wide visibility and Dependabot hygiene
- Rewrites โOpen PRsโ workflow in Python with age badges and clearer summaries; auto-merges safe Dependabot workflow PRs. See PR #581: Update Open PRs. ๐ฆ๐ข
- Shows up to 30 PRs per repo and merges at most one safe workflow-only PR per repo.
๐ฏ Purpose & Impact
- Fewer comment rejections and higher review accuracy
- R/L-prefixed line numbers eliminate guessing and line-number drift in long diffs. โ
- Stricter validation prevents misaligned comments and reduces GitHub API errors.
- Better reviewer and contributor experience
- Clear instructions and consistent formatting simplify parsing and reviewing. ๐งฉ
- Cleaner logs and trimmed summaries make CI output easier to scan. ๐งน
- More robust automation
- Augmented diff-based truncation keeps context even in large changes. ๐
- Safer retries reduce flakiness during model calls; improved logging aids debugging. ๐
- Improved org maintenance
- Python-based โOpen PRsโ summary boosts visibility into active work with intuitive age signals. ๐
- Safe, automated Dependabot merges keep workflows up to date with minimal risk. ๐ค
Tip: When programmatically creating review comments, ensure side matches the prefix:
- Use
side: "RIGHT"forR####lines (new code). - Use
side: "LEFT"forL####lines (removed code). - Suggestions only on RIGHT lines.
What's Changed
- Fix OpenAI retry logic by @glenn-jocher in #582
- Update Open PRs by @glenn-jocher in #581
- Improve line number logic by @glenn-jocher in #583
- Explicit diff line numbers by @glenn-jocher in #584
Full Changelog: v0.1.8...v0.1.9