From 6a6c06d5482c384fbc23bc03eea78544af7f2ae8 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 10 Aug 2026 03:22:34 +0200 Subject: [PATCH] Clean up shared action warnings (#865) --- action.yml | 2 ++ actions/__init__.py | 2 +- actions/summarize_pr.py | 5 +++-- pyproject.toml | 2 -- setup-uv/README.md | 1 + setup-uv/action.yml | 5 +++++ 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index f75c45c..dcb5275 100644 --- a/action.yml +++ b/action.yml @@ -108,6 +108,8 @@ runs: python-version: ${{ inputs.python-version }} - uses: ultralytics/actions/setup-uv@main + with: + ignore-empty-workdir: true - name: Install Dependencies # Note tomli required for codespell with pyproject.toml env: diff --git a/actions/__init__.py b/actions/__init__.py index ce075ef..d75bdc2 100644 --- a/actions/__init__.py +++ b/actions/__init__.py @@ -28,4 +28,4 @@ # ├── test_summarize_pr.py # └── ... -__version__ = "0.3.3" +__version__ = "0.3.4" diff --git a/actions/summarize_pr.py b/actions/summarize_pr.py index c30fd62..982d82a 100644 --- a/actions/summarize_pr.py +++ b/actions/summarize_pr.py @@ -114,8 +114,9 @@ def main(*args, **kwargs): if event.pr.get("merged"): print("PR is merged, labeling fixed issues...") pr_credit = label_fixed_issues(event, summary) - print("Removing TODO label from PR...") - event.remove_labels(event.pr["number"], labels=("TODO",)) + if any(label["name"].casefold() == "todo" for label in event.pr.get("labels", [])): + print("Removing TODO label from PR...") + event.remove_labels(event.pr["number"], labels=("TODO",)) if pr_credit: print("Posting PR author thank you message...") event.add_comment( diff --git a/pyproject.toml b/pyproject.toml index eb959a3..6a3fe43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,6 @@ dynamic = ["version"] description = "Ultralytics Actions for GitHub automation and PR management." readme = "README.md" requires-python = ">=3.8" -license = { text = "AGPL-3.0" } keywords = [ "github-actions", "ci-cd", @@ -50,7 +49,6 @@ maintainers = [ classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/setup-uv/README.md b/setup-uv/README.md index 0faa867..425b0ee 100644 --- a/setup-uv/README.md +++ b/setup-uv/README.md @@ -21,3 +21,4 @@ Provides Ultralytics defaults for the official [uv setup action](https://github. | `activate-environment` | Create and activate a `.venv` environment | No | `false` | | `enable-cache` | Cache uv downloads between workflow runs | No | `false` | | `cache-dependency-glob` | Dependency files used to invalidate cache | No | `**/uv.lock` | +| `ignore-empty-workdir` | Suppress warnings for an empty workdir | No | `false` | diff --git a/setup-uv/action.yml b/setup-uv/action.yml index eb0c313..35b95a0 100644 --- a/setup-uv/action.yml +++ b/setup-uv/action.yml @@ -19,6 +19,10 @@ inputs: description: "Dependency files used to invalidate the uv cache" required: false default: "**/uv.lock" + ignore-empty-workdir: + description: "Suppress the warning when the working directory is intentionally empty" + required: false + default: "false" runs: using: "composite" @@ -29,4 +33,5 @@ runs: activate-environment: ${{ inputs.activate-environment }} enable-cache: ${{ inputs.enable-cache }} cache-dependency-glob: ${{ inputs.cache-dependency-glob }} + ignore-empty-workdir: ${{ inputs.ignore-empty-workdir }} ignore-nothing-to-cache: true