ultralytics-actions


Nameultralytics-actions JSON
Version 0.0.95 PyPI version JSON
download
home_pageNone
SummaryUltralytics Actions for GitHub automation and PR management.
upload_time2025-08-25 01:01:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseAGPL-3.0
keywords github-actions ci-cd workflow-automation pull-request-automation code-review release-automation markdown-processing devops github-integration continuous-integration
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <a href="https://www.ultralytics.com/"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/logo/Ultralytics_Logotype_Original.svg" width="320" alt="Ultralytics logo"></a>

# 🚀 Ultralytics Actions: Auto-Formatting for Python, Markdown, and Swift

Welcome to the [Ultralytics Actions](https://github.com/ultralytics/actions) repository, your go-to solution for maintaining consistent code quality across Ultralytics Python and Swift projects. This GitHub Action is designed to automate the formatting of Python, Markdown, and Swift files, ensuring adherence to our coding standards and enhancing project maintainability.

[![GitHub Actions Marketplace](https://img.shields.io/badge/Marketplace-Ultralytics_Actions-blue?style=flat&logo=github)](https://github.com/marketplace/actions/ultralytics-actions)

[![Actions CI](https://github.com/ultralytics/actions/actions/workflows/ci.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/ci.yml)
[![Ultralytics Actions](https://github.com/ultralytics/actions/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/format.yml)
[![codecov](https://codecov.io/github/ultralytics/actions/graph/badge.svg?token=DoizJ1WS6j)](https://codecov.io/github/ultralytics/actions)
[![PyPI version](https://badge.fury.io/py/ultralytics-actions.svg)](https://badge.fury.io/py/ultralytics-actions)
[![Downloads](https://static.pepy.tech/badge/ultralytics-actions)](https://clickpy.clickhouse.com/dashboard/ultralytics-actions)

[![Ultralytics Discord](https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue)](https://discord.com/invite/ultralytics)
[![Ultralytics Forums](https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue)](https://community.ultralytics.com/)
[![Ultralytics Reddit](https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue)](https://reddit.com/r/ultralytics)

## 📄 Actions Description

Ultralytics Actions automatically applies formats, updates, and enhancements using a suite of powerful tools:

- **Python Code:** Formatted using [Ruff](https://github.com/astral-sh/ruff), an extremely fast Python linter and formatter.
- **Markdown Files:** Styled with [Prettier](https://github.com/prettier/prettier) to ensure consistent documentation appearance.
- **Docstrings:** Cleaned and standardized using [docformatter](https://github.com/PyCQA/docformatter).
- **Swift Code:** Formatted with [`swift-format`](https://github.com/swiftlang/swift-format) to maintain a uniform coding style across Swift projects. _(Note: Requires the `macos-latest` runner.)_
- **Spell Check:** Common misspellings are caught using [codespell](https://github.com/codespell-project/codespell).
- **Broken Links Check:** Broken links in documentation and Markdown files are identified using [Lychee](https://github.com/lycheeverse/lychee).
- **PR Summary:** Concise Pull Request summaries are generated using [OpenAI](https://openai.com/) GPT-5, improving clarity and review efficiency.
- **Auto-labeling:** Relevant labels are applied to issues and pull requests via [OpenAI](https://openai.com/) GPT-5 for intelligent categorization.

## 🛠️ How It Works

Ultralytics Actions triggers on various GitHub events to streamline workflows:

- **Push Events:** Automatically formats code when changes are pushed to the `main` branch.
- **Pull Requests:**
  - Ensures contributions meet formatting standards before merging.
  - Generates a concise summary of changes using GPT-5.
  - Applies relevant labels using GPT-5 for intelligent categorization.
- **Issues:** Automatically applies relevant labels using GPT-5 when new issues are created.

These automated actions help maintain high code quality, improve documentation clarity, and streamline the review process by providing consistent formatting, informative summaries, and appropriate categorization.

## 🔧 Setting Up the Action

To integrate this action into your Ultralytics repository:

1.  **Create a Workflow File:** In your repository, create a YAML file under `.github/workflows/`, for example, `ultralytics-actions.yml`.

2.  **Add the Action:** Configure the Ultralytics Actions in your workflow file as shown below:

    ```yaml
    # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

    # Ultralytics Actions https://github.com/ultralytics/actions
    # This workflow formats code and documentation in PRs to Ultralytics standards

    name: Ultralytics Actions

    on:
      issues:
        types: [opened]
      pull_request:
        branches: [main]
        types: [opened, closed, synchronize, review_requested]

    permissions:
      contents: write # Modify code in PRs
      pull-requests: write # Add comments and labels to PRs
      issues: write # Add comments and labels to issues

    jobs:
      actions:
        runs-on: ubuntu-latest
        steps:
          - name: Run Ultralytics Actions
            uses: ultralytics/actions@main
            with:
              token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated token
              labels: true # Auto-label issues/PRs using AI
              python: true # Format Python with Ruff and docformatter
              prettier: true # Format YAML, JSON, Markdown, CSS
              swift: false # Format Swift (requires macos-latest)
              dart: false # Format Dart/Flutter
              spelling: true # Check spelling with codespell
              links: true # Check broken links with Lychee
              summary: true # Generate AI-powered PR summaries
              openai_api_key: ${{ secrets.OPENAI_API_KEY }} # Powers PR summaries, labels and comments
              brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution
    ```

3.  **Customize:** Adjust the `runs-on` runner and the boolean flags (`labels`, `python`, `prettier`, `swift`, `spelling`, `links`, `summary`) based on your project's needs. Remember to add your `OPENAI_API_KEY` as a secret in your repository settings if you enable `labels` or `summary`.

## 💡 Contribute

Ultralytics thrives on community collaboration, and we deeply value your contributions! Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) for details on how you can get involved. We also encourage you to share your feedback through our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A huge thank you 🙏 to all our contributors!

[![Ultralytics open-source contributors](https://raw.githubusercontent.com/ultralytics/assets/main/im/image-contributors.png)](https://github.com/ultralytics/ultralytics/graphs/contributors)

## 📄 License

Ultralytics offers two licensing options:

- **AGPL-3.0 License**: An [OSI-approved](https://opensource.org/license/agpl-v3) open-source license ideal for students, researchers, and enthusiasts who value open collaboration. See the [LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) file for details.
- **Enterprise License**: Designed for commercial use, this license allows integrating Ultralytics software and AI models into commercial products without AGPL-3.0's open-source requirements. For enterprise solutions, contact [Ultralytics Licensing](https://www.ultralytics.com/license).

## 📫 Contact

For bug reports or feature suggestions related to Ultralytics Actions, please submit an issue via [GitHub Issues](https://github.com/ultralytics/actions/issues). Join our [Discord](https://discord.com/invite/ultralytics) community for discussions and support!

<br>
<div align="center">
  <a href="https://github.com/ultralytics"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-github.png" width="3%" alt="Ultralytics GitHub"></a>
  <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%" alt="space">
  <a href="https://www.linkedin.com/company/ultralytics/"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-linkedin.png" width="3%" alt="Ultralytics LinkedIn"></a>
  <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%" alt="space">
  <a href="https://twitter.com/ultralytics"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-twitter.png" width="3%" alt="Ultralytics Twitter"></a>
  <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%" alt="space">
  <a href="https://youtube.com/ultralytics"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-youtube.png" width="3%" alt="Ultralytics YouTube"></a>
  <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%" alt="space">
  <a href="https://www.tiktok.com/@ultralytics"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-tiktok.png" width="3%" alt="Ultralytics TikTok"></a>
  <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%" alt="space">
  <a href="https://ultralytics.com/bilibili"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-bilibili.png" width="3%" alt="Ultralytics BiliBili"></a>
  <img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png" width="3%" alt="space">
  <a href="https://discord.com/invite/ultralytics"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-discord.png" width="3%" alt="Ultralytics Discord"></a>
</div>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ultralytics-actions",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Ultralytics <hello@ultralytics.com>",
    "keywords": "github-actions, ci-cd, workflow-automation, pull-request-automation, code-review, release-automation, markdown-processing, devops, github-integration, continuous-integration",
    "author": null,
    "author_email": "Glenn Jocher <glenn.jocher@ultralytics.com>",
    "download_url": "https://files.pythonhosted.org/packages/a5/24/62f239ac9c4440f8cecd4502d7fc51704a383cc7f3ffc768f8b46b1b8d23/ultralytics_actions-0.0.95.tar.gz",
    "platform": null,
    "description": "<a href=\"https://www.ultralytics.com/\"><img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/logo/Ultralytics_Logotype_Original.svg\" width=\"320\" alt=\"Ultralytics logo\"></a>\n\n# \ud83d\ude80 Ultralytics Actions: Auto-Formatting for Python, Markdown, and Swift\n\nWelcome to the [Ultralytics Actions](https://github.com/ultralytics/actions) repository, your go-to solution for maintaining consistent code quality across Ultralytics Python and Swift projects. This GitHub Action is designed to automate the formatting of Python, Markdown, and Swift files, ensuring adherence to our coding standards and enhancing project maintainability.\n\n[![GitHub Actions Marketplace](https://img.shields.io/badge/Marketplace-Ultralytics_Actions-blue?style=flat&logo=github)](https://github.com/marketplace/actions/ultralytics-actions)\n\n[![Actions CI](https://github.com/ultralytics/actions/actions/workflows/ci.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/ci.yml)\n[![Ultralytics Actions](https://github.com/ultralytics/actions/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/format.yml)\n[![codecov](https://codecov.io/github/ultralytics/actions/graph/badge.svg?token=DoizJ1WS6j)](https://codecov.io/github/ultralytics/actions)\n[![PyPI version](https://badge.fury.io/py/ultralytics-actions.svg)](https://badge.fury.io/py/ultralytics-actions)\n[![Downloads](https://static.pepy.tech/badge/ultralytics-actions)](https://clickpy.clickhouse.com/dashboard/ultralytics-actions)\n\n[![Ultralytics Discord](https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue)](https://discord.com/invite/ultralytics)\n[![Ultralytics Forums](https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue)](https://community.ultralytics.com/)\n[![Ultralytics Reddit](https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue)](https://reddit.com/r/ultralytics)\n\n## \ud83d\udcc4 Actions Description\n\nUltralytics Actions automatically applies formats, updates, and enhancements using a suite of powerful tools:\n\n- **Python Code:** Formatted using [Ruff](https://github.com/astral-sh/ruff), an extremely fast Python linter and formatter.\n- **Markdown Files:** Styled with [Prettier](https://github.com/prettier/prettier) to ensure consistent documentation appearance.\n- **Docstrings:** Cleaned and standardized using [docformatter](https://github.com/PyCQA/docformatter).\n- **Swift Code:** Formatted with [`swift-format`](https://github.com/swiftlang/swift-format) to maintain a uniform coding style across Swift projects. _(Note: Requires the `macos-latest` runner.)_\n- **Spell Check:** Common misspellings are caught using [codespell](https://github.com/codespell-project/codespell).\n- **Broken Links Check:** Broken links in documentation and Markdown files are identified using [Lychee](https://github.com/lycheeverse/lychee).\n- **PR Summary:** Concise Pull Request summaries are generated using [OpenAI](https://openai.com/) GPT-5, improving clarity and review efficiency.\n- **Auto-labeling:** Relevant labels are applied to issues and pull requests via [OpenAI](https://openai.com/) GPT-5 for intelligent categorization.\n\n## \ud83d\udee0\ufe0f How It Works\n\nUltralytics Actions triggers on various GitHub events to streamline workflows:\n\n- **Push Events:** Automatically formats code when changes are pushed to the `main` branch.\n- **Pull Requests:**\n  - Ensures contributions meet formatting standards before merging.\n  - Generates a concise summary of changes using GPT-5.\n  - Applies relevant labels using GPT-5 for intelligent categorization.\n- **Issues:** Automatically applies relevant labels using GPT-5 when new issues are created.\n\nThese automated actions help maintain high code quality, improve documentation clarity, and streamline the review process by providing consistent formatting, informative summaries, and appropriate categorization.\n\n## \ud83d\udd27 Setting Up the Action\n\nTo integrate this action into your Ultralytics repository:\n\n1.  **Create a Workflow File:** In your repository, create a YAML file under `.github/workflows/`, for example, `ultralytics-actions.yml`.\n\n2.  **Add the Action:** Configure the Ultralytics Actions in your workflow file as shown below:\n\n    ```yaml\n    # Ultralytics \ud83d\ude80 AGPL-3.0 License - https://ultralytics.com/license\n\n    # Ultralytics Actions https://github.com/ultralytics/actions\n    # This workflow formats code and documentation in PRs to Ultralytics standards\n\n    name: Ultralytics Actions\n\n    on:\n      issues:\n        types: [opened]\n      pull_request:\n        branches: [main]\n        types: [opened, closed, synchronize, review_requested]\n\n    permissions:\n      contents: write # Modify code in PRs\n      pull-requests: write # Add comments and labels to PRs\n      issues: write # Add comments and labels to issues\n\n    jobs:\n      actions:\n        runs-on: ubuntu-latest\n        steps:\n          - name: Run Ultralytics Actions\n            uses: ultralytics/actions@main\n            with:\n              token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated token\n              labels: true # Auto-label issues/PRs using AI\n              python: true # Format Python with Ruff and docformatter\n              prettier: true # Format YAML, JSON, Markdown, CSS\n              swift: false # Format Swift (requires macos-latest)\n              dart: false # Format Dart/Flutter\n              spelling: true # Check spelling with codespell\n              links: true # Check broken links with Lychee\n              summary: true # Generate AI-powered PR summaries\n              openai_api_key: ${{ secrets.OPENAI_API_KEY }} # Powers PR summaries, labels and comments\n              brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution\n    ```\n\n3.  **Customize:** Adjust the `runs-on` runner and the boolean flags (`labels`, `python`, `prettier`, `swift`, `spelling`, `links`, `summary`) based on your project's needs. Remember to add your `OPENAI_API_KEY` as a secret in your repository settings if you enable `labels` or `summary`.\n\n## \ud83d\udca1 Contribute\n\nUltralytics thrives on community collaboration, and we deeply value your contributions! Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) for details on how you can get involved. We also encourage you to share your feedback through our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A huge thank you \ud83d\ude4f to all our contributors!\n\n[![Ultralytics open-source contributors](https://raw.githubusercontent.com/ultralytics/assets/main/im/image-contributors.png)](https://github.com/ultralytics/ultralytics/graphs/contributors)\n\n## \ud83d\udcc4 License\n\nUltralytics offers two licensing options:\n\n- **AGPL-3.0 License**: An [OSI-approved](https://opensource.org/license/agpl-v3) open-source license ideal for students, researchers, and enthusiasts who value open collaboration. See the [LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) file for details.\n- **Enterprise License**: Designed for commercial use, this license allows integrating Ultralytics software and AI models into commercial products without AGPL-3.0's open-source requirements. For enterprise solutions, contact [Ultralytics Licensing](https://www.ultralytics.com/license).\n\n## \ud83d\udceb Contact\n\nFor bug reports or feature suggestions related to Ultralytics Actions, please submit an issue via [GitHub Issues](https://github.com/ultralytics/actions/issues). Join our [Discord](https://discord.com/invite/ultralytics) community for discussions and support!\n\n<br>\n<div align=\"center\">\n  <a href=\"https://github.com/ultralytics\"><img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-github.png\" width=\"3%\" alt=\"Ultralytics GitHub\"></a>\n  <img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png\" width=\"3%\" alt=\"space\">\n  <a href=\"https://www.linkedin.com/company/ultralytics/\"><img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-linkedin.png\" width=\"3%\" alt=\"Ultralytics LinkedIn\"></a>\n  <img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png\" width=\"3%\" alt=\"space\">\n  <a href=\"https://twitter.com/ultralytics\"><img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-twitter.png\" width=\"3%\" alt=\"Ultralytics Twitter\"></a>\n  <img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png\" width=\"3%\" alt=\"space\">\n  <a href=\"https://youtube.com/ultralytics\"><img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-youtube.png\" width=\"3%\" alt=\"Ultralytics YouTube\"></a>\n  <img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png\" width=\"3%\" alt=\"space\">\n  <a href=\"https://www.tiktok.com/@ultralytics\"><img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-tiktok.png\" width=\"3%\" alt=\"Ultralytics TikTok\"></a>\n  <img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png\" width=\"3%\" alt=\"space\">\n  <a href=\"https://ultralytics.com/bilibili\"><img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-bilibili.png\" width=\"3%\" alt=\"Ultralytics BiliBili\"></a>\n  <img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-transparent.png\" width=\"3%\" alt=\"space\">\n  <a href=\"https://discord.com/invite/ultralytics\"><img src=\"https://raw.githubusercontent.com/ultralytics/assets/main/social/logo-social-discord.png\" width=\"3%\" alt=\"Ultralytics Discord\"></a>\n</div>\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0",
    "summary": "Ultralytics Actions for GitHub automation and PR management.",
    "version": "0.0.95",
    "project_urls": {
        "Bug Reports": "https://github.com/ultralytics/actions/issues",
        "Changelog": "https://github.com/ultralytics/actions/releases",
        "Documentation": "https://docs.ultralytics.com",
        "Homepage": "https://ultralytics.com",
        "Source": "https://github.com/ultralytics/actions"
    },
    "split_keywords": [
        "github-actions",
        " ci-cd",
        " workflow-automation",
        " pull-request-automation",
        " code-review",
        " release-automation",
        " markdown-processing",
        " devops",
        " github-integration",
        " continuous-integration"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "79fe66f91f0d20ee813f8a616e5123534e4a47d3e6d7d262e7862a7489fabe18",
                "md5": "2aeece8d679a282206f5bb658dd70c74",
                "sha256": "120ae0c23ad105820a7a2c0d24fa0368be1ca97b999bf47c95a2e14dcce38e31"
            },
            "downloads": -1,
            "filename": "ultralytics_actions-0.0.95-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2aeece8d679a282206f5bb658dd70c74",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 48252,
            "upload_time": "2025-08-25T01:01:03",
            "upload_time_iso_8601": "2025-08-25T01:01:03.332748Z",
            "url": "https://files.pythonhosted.org/packages/79/fe/66f91f0d20ee813f8a616e5123534e4a47d3e6d7d262e7862a7489fabe18/ultralytics_actions-0.0.95-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a52462f239ac9c4440f8cecd4502d7fc51704a383cc7f3ffc768f8b46b1b8d23",
                "md5": "bb95912189eb081e448906e6e026a560",
                "sha256": "6a6e68d35266a81bd2b6abec2d6dc7123f7dca977b897e52a6ce00499f6eb4bd"
            },
            "downloads": -1,
            "filename": "ultralytics_actions-0.0.95.tar.gz",
            "has_sig": false,
            "md5_digest": "bb95912189eb081e448906e6e026a560",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 55557,
            "upload_time": "2025-08-25T01:01:04",
            "upload_time_iso_8601": "2025-08-25T01:01:04.939340Z",
            "url": "https://files.pythonhosted.org/packages/a5/24/62f239ac9c4440f8cecd4502d7fc51704a383cc7f3ffc768f8b46b1b8d23/ultralytics_actions-0.0.95.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-25 01:01:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ultralytics",
    "github_project": "actions",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ultralytics-actions"
}
        
Elapsed time: 1.74778s