ultralytics-actions 0.1.9__tar.gz → 0.2.1__tar.gz

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.

Potentially problematic release.


This version of ultralytics-actions might be problematic. Click here for more details.

Files changed (38) hide show
  1. {ultralytics_actions-0.1.9/ultralytics_actions.egg-info → ultralytics_actions-0.2.1}/PKG-INFO +114 -66
  2. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/README.md +113 -65
  3. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/__init__.py +4 -1
  4. ultralytics_actions-0.2.1/actions/dispatch_actions.py +172 -0
  5. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/first_interaction.py +5 -7
  6. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/review_pr.py +48 -35
  7. ultralytics_actions-0.2.1/actions/scan_prs.py +205 -0
  8. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/summarize_pr.py +4 -5
  9. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/summarize_release.py +1 -1
  10. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/utils/__init__.py +4 -2
  11. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/utils/common_utils.py +1 -0
  12. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/utils/github_utils.py +19 -8
  13. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/utils/openai_utils.py +50 -22
  14. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_dispatch_actions.py +62 -6
  15. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_github_utils.py +8 -9
  16. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1/ultralytics_actions.egg-info}/PKG-INFO +114 -66
  17. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/ultralytics_actions.egg-info/SOURCES.txt +1 -0
  18. ultralytics_actions-0.1.9/actions/dispatch_actions.py +0 -116
  19. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/LICENSE +0 -0
  20. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/update_file_headers.py +0 -0
  21. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/update_markdown_code_blocks.py +0 -0
  22. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/actions/utils/version_utils.py +0 -0
  23. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/pyproject.toml +0 -0
  24. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/setup.cfg +0 -0
  25. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_cli_commands.py +0 -0
  26. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_common_utils.py +0 -0
  27. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_file_headers.py +0 -0
  28. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_first_interaction.py +0 -0
  29. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_init.py +0 -0
  30. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_openai_utils.py +0 -0
  31. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_summarize_pr.py +0 -0
  32. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_summarize_release.py +0 -0
  33. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_update_markdown_codeblocks.py +0 -0
  34. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/tests/test_urls.py +0 -0
  35. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/ultralytics_actions.egg-info/dependency_links.txt +0 -0
  36. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/ultralytics_actions.egg-info/entry_points.txt +0 -0
  37. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/ultralytics_actions.egg-info/requires.txt +0 -0
  38. {ultralytics_actions-0.1.9 → ultralytics_actions-0.2.1}/ultralytics_actions.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ultralytics-actions
3
- Version: 0.1.9
3
+ Version: 0.2.1
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>
@@ -38,111 +38,159 @@ Dynamic: license-file
38
38
 
39
39
  <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>
40
40
 
41
- # 🚀 Ultralytics Actions: AI-powered formatting, labeling & PR summaries for Python and Markdown
41
+ # 🚀 Ultralytics Actions
42
42
 
43
- 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.
43
+ Welcome to [Ultralytics Actions](https://github.com/ultralytics/actions) - a collection of GitHub Actions and Python tools for automating code quality, PR management, and CI/CD workflows across Ultralytics projects.
44
44
 
45
45
  [![GitHub Actions Marketplace](https://img.shields.io/badge/Marketplace-Ultralytics_Actions-blue?style=flat&logo=github)](https://github.com/marketplace/actions/ultralytics-actions)
46
46
 
47
47
  [![Actions CI](https://github.com/ultralytics/actions/actions/workflows/ci.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/ci.yml)
48
48
  [![Ultralytics Actions](https://github.com/ultralytics/actions/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/format.yml)
49
- [![List Open PRs](https://github.com/ultralytics/actions/actions/workflows/open-prs.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/open-prs.yml)
49
+ [![Scan PRs](https://github.com/ultralytics/actions/actions/workflows/scan-prs.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/scan-prs.yml)
50
50
  [![codecov](https://codecov.io/github/ultralytics/actions/graph/badge.svg?token=DoizJ1WS6j)](https://codecov.io/github/ultralytics/actions)
51
51
 
52
52
  [![Ultralytics Discord](https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue)](https://discord.com/invite/ultralytics)
53
53
  [![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/)
54
54
  [![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)
55
55
 
56
- ## 📄 Actions Description
56
+ ## 📦 Repository Contents
57
57
 
58
- Ultralytics Actions automatically applies formats, updates, and enhancements using a suite of powerful tools:
58
+ This repository provides three main components:
59
59
 
60
- - **Python Code:** Formatted using [Ruff](https://github.com/astral-sh/ruff), an extremely fast Python linter and formatter.
61
- - **Markdown Files:** Styled with [Prettier](https://github.com/prettier/prettier) to ensure consistent documentation appearance.
62
- - **Docstrings:** Cleaned and standardized using [docformatter](https://github.com/PyCQA/docformatter).
63
- - **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.)_
64
- - **Spell Check:** Common misspellings are caught using [codespell](https://github.com/codespell-project/codespell).
65
- - **Broken Links Check:** Broken links in documentation and Markdown files are identified using [Lychee](https://github.com/lycheeverse/lychee).
66
- - **PR Summary:** Concise Pull Request summaries are generated using [OpenAI](https://openai.com/) GPT-5, improving clarity and review efficiency.
67
- - **PR Review:** AI-powered code reviews identify critical bugs, security issues, and code quality concerns with suggested fixes.
68
- - **Auto-labeling:** Applies relevant labels to issues and PRs via [OpenAI](https://openai.com/) GPT-5 for intelligent categorization.
60
+ 1. **[Ultralytics Actions](#ultralytics-actions-main-action)** - Main GitHub Action for AI-powered code formatting, PR summaries, and auto-labeling
61
+ 2. **[Standalone Actions](#standalone-actions)** - Reusable composite actions for common CI/CD tasks
62
+ 3. **[Python Package](#python-package)** - `ultralytics-actions` package for programmatic use
69
63
 
70
- ## 🛠️ How It Works
64
+ ## Ultralytics Actions (Main Action)
71
65
 
72
- Ultralytics Actions triggers on various GitHub events to streamline workflows:
66
+ AI-powered formatting, labeling, and PR summaries for Python, Swift, and Markdown files.
73
67
 
74
- - **Push Events:** Automatically formats code when changes are pushed to the `main` branch.
75
- - **Pull Requests:**
76
- - Ensures contributions meet formatting standards before merging.
77
- - Generates a concise summary of changes using GPT-5.
78
- - Provides AI-powered inline code reviews with suggested fixes for critical issues.
79
- - Applies relevant labels using GPT-5 for intelligent categorization.
80
- - **Issues:** Automatically applies relevant labels using GPT-5 when new issues are created.
68
+ ### 📄 Features
81
69
 
82
- 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.
70
+ - **Python Code:** Formatted using [Ruff](https://github.com/astral-sh/ruff), an extremely fast Python linter and formatter
71
+ - **Markdown Files:** Styled with [Prettier](https://github.com/prettier/prettier) to ensure consistent documentation appearance
72
+ - **Docstrings:** Cleaned and standardized using [docformatter](https://github.com/PyCQA/docformatter)
73
+ - **Swift Code:** Formatted with [`swift-format`](https://github.com/swiftlang/swift-format) _(requires `macos-latest` runner)_
74
+ - **Spell Check:** Common misspellings caught using [codespell](https://github.com/codespell-project/codespell)
75
+ - **Broken Links Check:** Broken links identified using [Lychee](https://github.com/lycheeverse/lychee)
76
+ - **PR Summary:** Concise Pull Request summaries generated using [OpenAI](https://openai.com/) GPT-5
77
+ - **PR Review:** AI-powered code reviews identify critical bugs, security issues, and quality concerns with suggested fixes
78
+ - **Auto-labeling:** Applies relevant labels to issues and PRs via [OpenAI](https://openai.com/) GPT-5
83
79
 
84
- ## 🔧 Setting Up the Action
80
+ ### 🛠️ How It Works
85
81
 
86
- To integrate this action into your Ultralytics repository:
82
+ Triggers on GitHub events to streamline workflows:
87
83
 
88
- 1. **Create a Workflow File:** In your repository, create a YAML file under `.github/workflows/`, for example, `ultralytics-actions.yml`.
84
+ - **Push Events:** Automatically formats code when changes are pushed to `main`
85
+ - **Pull Requests:** Ensures formatting standards, generates summaries, provides AI reviews, and applies labels
86
+ - **Issues:** Automatically applies relevant labels using GPT-5
89
87
 
90
- 2. **Add the Action:** Configure the Ultralytics Actions in your workflow file as shown below:
88
+ ### 🔧 Setup
91
89
 
92
- ```yaml
93
- # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
90
+ Create `.github/workflows/ultralytics-actions.yml`:
94
91
 
95
- # Ultralytics Actions https://github.com/ultralytics/actions
96
- # This workflow formats code and documentation in PRs to Ultralytics standards
92
+ ```yaml
93
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
97
94
 
98
- name: Ultralytics Actions
95
+ # Ultralytics Actions https://github.com/ultralytics/actions
96
+ # This workflow formats code and documentation in PRs to Ultralytics standards
99
97
 
100
- on:
101
- issues:
102
- types: [opened]
103
- pull_request:
104
- branches: [main]
105
- types: [opened, closed, synchronize, review_requested]
98
+ name: Ultralytics Actions
106
99
 
107
- permissions:
108
- contents: write # Modify code in PRs
109
- pull-requests: write # Add comments and labels to PRs
110
- issues: write # Add comments and labels to issues
100
+ on:
101
+ issues:
102
+ types: [opened]
103
+ pull_request:
104
+ branches: [main]
105
+ types: [opened, closed, synchronize, review_requested]
111
106
 
112
- jobs:
113
- actions:
114
- runs-on: ubuntu-latest
115
- steps:
116
- - name: Run Ultralytics Actions
117
- uses: ultralytics/actions@main
118
- with:
119
- token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated token
120
- labels: true # Auto-label issues/PRs using AI
121
- python: true # Format Python with Ruff and docformatter
122
- prettier: true # Format YAML, JSON, Markdown, CSS
123
- swift: false # Format Swift (requires macos-latest)
124
- dart: false # Format Dart/Flutter
125
- spelling: true # Check spelling with codespell
126
- links: true # Check broken links with Lychee
127
- summary: true # Generate AI-powered PR summaries
128
- openai_api_key: ${{ secrets.OPENAI_API_KEY }} # Powers PR summaries, labels and comments
129
- brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution
130
- ```
107
+ permissions:
108
+ contents: write # Modify code in PRs
109
+ pull-requests: write # Add comments and labels to PRs
110
+ issues: write # Add comments and labels to issues
131
111
 
132
- 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`.
112
+ jobs:
113
+ actions:
114
+ runs-on: ubuntu-latest
115
+ steps:
116
+ - name: Run Ultralytics Actions
117
+ uses: ultralytics/actions@main
118
+ with:
119
+ token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated token
120
+ labels: true # Auto-label issues/PRs using AI
121
+ python: true # Format Python with Ruff and docformatter
122
+ prettier: true # Format YAML, JSON, Markdown, CSS
123
+ swift: false # Format Swift (requires macos-latest)
124
+ dart: false # Format Dart/Flutter
125
+ spelling: true # Check spelling with codespell
126
+ links: true # Check broken links with Lychee
127
+ summary: true # Generate AI-powered PR summaries
128
+ openai_api_key: ${{ secrets.OPENAI_API_KEY }} # Powers PR summaries, labels and reviews
129
+ brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution
130
+ ```
131
+
132
+ ## Standalone Actions
133
+
134
+ Reusable composite actions for common CI/CD tasks. Each can be used independently in your workflows.
135
+
136
+ ### 1. Retry Action
137
+
138
+ Retry failed commands with exponential backoff.
139
+
140
+ ```yaml
141
+ - uses: ultralytics/actions/retry@main
142
+ with:
143
+ command: npm install
144
+ max_attempts: 3
145
+ timeout_minutes: 5
146
+ ```
147
+
148
+ [**📖 Full Documentation →**](retry/README.md)
149
+
150
+ ### 2. Cleanup Disk Action
151
+
152
+ Free up disk space on GitHub runners by removing unnecessary packages and files.
153
+
154
+ ```yaml
155
+ - uses: ultralytics/actions/cleanup-disk@main
156
+ ```
157
+
158
+ [**📖 Full Documentation →**](cleanup-disk/README.md)
159
+
160
+ ### 3. Scan PRs Action
161
+
162
+ List open PRs across an organization and auto-merge eligible Dependabot PRs.
163
+
164
+ ```yaml
165
+ - uses: ultralytics/actions/scan-prs@main
166
+ with:
167
+ token: ${{ secrets.GITHUB_TOKEN }}
168
+ org: ultralytics # Optional: defaults to ultralytics
169
+ visibility: public # Optional: public, private, internal, or all
170
+ ```
171
+
172
+ [**📖 Full Documentation →**](scan-prs/README.md)
133
173
 
134
174
  ## Python Package
135
175
 
136
- Install the `ultralytics-actions` Python package directly with Pip:
176
+ Install `ultralytics-actions` for programmatic access to action utilities.
137
177
 
138
178
  [![PyPI - Version](https://img.shields.io/pypi/v/ultralytics-actions?logo=pypi&logoColor=white)](https://pypi.org/project/ultralytics-actions/)
139
179
  [![Ultralytics Downloads](https://static.pepy.tech/badge/ultralytics-actions)](https://clickpy.clickhouse.com/dashboard/ultralytics-actions)
140
180
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ultralytics-actions?logo=python&logoColor=gold)](https://pypi.org/project/ultralytics-actions/)
141
181
 
142
- ```sh
182
+ ```bash
143
183
  pip install ultralytics-actions
144
184
  ```
145
185
 
186
+ **Available Modules:**
187
+
188
+ - `actions.review_pr` - AI-powered PR review
189
+ - `actions.summarize_pr` - Generate PR summaries
190
+ - `actions.scan_prs` - Scan and manage organization PRs
191
+ - `actions.first_interaction` - Welcome message for new contributors
192
+ - And more in `actions/` directory
193
+
146
194
  ## 💡 Contribute
147
195
 
148
196
  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!
@@ -1,110 +1,158 @@
1
1
  <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>
2
2
 
3
- # 🚀 Ultralytics Actions: AI-powered formatting, labeling & PR summaries for Python and Markdown
3
+ # 🚀 Ultralytics Actions
4
4
 
5
- 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.
5
+ Welcome to [Ultralytics Actions](https://github.com/ultralytics/actions) - a collection of GitHub Actions and Python tools for automating code quality, PR management, and CI/CD workflows across Ultralytics projects.
6
6
 
7
7
  [![GitHub Actions Marketplace](https://img.shields.io/badge/Marketplace-Ultralytics_Actions-blue?style=flat&logo=github)](https://github.com/marketplace/actions/ultralytics-actions)
8
8
 
9
9
  [![Actions CI](https://github.com/ultralytics/actions/actions/workflows/ci.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/ci.yml)
10
10
  [![Ultralytics Actions](https://github.com/ultralytics/actions/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/format.yml)
11
- [![List Open PRs](https://github.com/ultralytics/actions/actions/workflows/open-prs.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/open-prs.yml)
11
+ [![Scan PRs](https://github.com/ultralytics/actions/actions/workflows/scan-prs.yml/badge.svg)](https://github.com/ultralytics/actions/actions/workflows/scan-prs.yml)
12
12
  [![codecov](https://codecov.io/github/ultralytics/actions/graph/badge.svg?token=DoizJ1WS6j)](https://codecov.io/github/ultralytics/actions)
13
13
 
14
14
  [![Ultralytics Discord](https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue)](https://discord.com/invite/ultralytics)
15
15
  [![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/)
16
16
  [![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)
17
17
 
18
- ## 📄 Actions Description
18
+ ## 📦 Repository Contents
19
19
 
20
- Ultralytics Actions automatically applies formats, updates, and enhancements using a suite of powerful tools:
20
+ This repository provides three main components:
21
21
 
22
- - **Python Code:** Formatted using [Ruff](https://github.com/astral-sh/ruff), an extremely fast Python linter and formatter.
23
- - **Markdown Files:** Styled with [Prettier](https://github.com/prettier/prettier) to ensure consistent documentation appearance.
24
- - **Docstrings:** Cleaned and standardized using [docformatter](https://github.com/PyCQA/docformatter).
25
- - **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.)_
26
- - **Spell Check:** Common misspellings are caught using [codespell](https://github.com/codespell-project/codespell).
27
- - **Broken Links Check:** Broken links in documentation and Markdown files are identified using [Lychee](https://github.com/lycheeverse/lychee).
28
- - **PR Summary:** Concise Pull Request summaries are generated using [OpenAI](https://openai.com/) GPT-5, improving clarity and review efficiency.
29
- - **PR Review:** AI-powered code reviews identify critical bugs, security issues, and code quality concerns with suggested fixes.
30
- - **Auto-labeling:** Applies relevant labels to issues and PRs via [OpenAI](https://openai.com/) GPT-5 for intelligent categorization.
22
+ 1. **[Ultralytics Actions](#ultralytics-actions-main-action)** - Main GitHub Action for AI-powered code formatting, PR summaries, and auto-labeling
23
+ 2. **[Standalone Actions](#standalone-actions)** - Reusable composite actions for common CI/CD tasks
24
+ 3. **[Python Package](#python-package)** - `ultralytics-actions` package for programmatic use
31
25
 
32
- ## 🛠️ How It Works
26
+ ## Ultralytics Actions (Main Action)
33
27
 
34
- Ultralytics Actions triggers on various GitHub events to streamline workflows:
28
+ AI-powered formatting, labeling, and PR summaries for Python, Swift, and Markdown files.
35
29
 
36
- - **Push Events:** Automatically formats code when changes are pushed to the `main` branch.
37
- - **Pull Requests:**
38
- - Ensures contributions meet formatting standards before merging.
39
- - Generates a concise summary of changes using GPT-5.
40
- - Provides AI-powered inline code reviews with suggested fixes for critical issues.
41
- - Applies relevant labels using GPT-5 for intelligent categorization.
42
- - **Issues:** Automatically applies relevant labels using GPT-5 when new issues are created.
30
+ ### 📄 Features
43
31
 
44
- 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.
32
+ - **Python Code:** Formatted using [Ruff](https://github.com/astral-sh/ruff), an extremely fast Python linter and formatter
33
+ - **Markdown Files:** Styled with [Prettier](https://github.com/prettier/prettier) to ensure consistent documentation appearance
34
+ - **Docstrings:** Cleaned and standardized using [docformatter](https://github.com/PyCQA/docformatter)
35
+ - **Swift Code:** Formatted with [`swift-format`](https://github.com/swiftlang/swift-format) _(requires `macos-latest` runner)_
36
+ - **Spell Check:** Common misspellings caught using [codespell](https://github.com/codespell-project/codespell)
37
+ - **Broken Links Check:** Broken links identified using [Lychee](https://github.com/lycheeverse/lychee)
38
+ - **PR Summary:** Concise Pull Request summaries generated using [OpenAI](https://openai.com/) GPT-5
39
+ - **PR Review:** AI-powered code reviews identify critical bugs, security issues, and quality concerns with suggested fixes
40
+ - **Auto-labeling:** Applies relevant labels to issues and PRs via [OpenAI](https://openai.com/) GPT-5
45
41
 
46
- ## 🔧 Setting Up the Action
42
+ ### 🛠️ How It Works
47
43
 
48
- To integrate this action into your Ultralytics repository:
44
+ Triggers on GitHub events to streamline workflows:
49
45
 
50
- 1. **Create a Workflow File:** In your repository, create a YAML file under `.github/workflows/`, for example, `ultralytics-actions.yml`.
46
+ - **Push Events:** Automatically formats code when changes are pushed to `main`
47
+ - **Pull Requests:** Ensures formatting standards, generates summaries, provides AI reviews, and applies labels
48
+ - **Issues:** Automatically applies relevant labels using GPT-5
51
49
 
52
- 2. **Add the Action:** Configure the Ultralytics Actions in your workflow file as shown below:
50
+ ### 🔧 Setup
53
51
 
54
- ```yaml
55
- # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
52
+ Create `.github/workflows/ultralytics-actions.yml`:
56
53
 
57
- # Ultralytics Actions https://github.com/ultralytics/actions
58
- # This workflow formats code and documentation in PRs to Ultralytics standards
54
+ ```yaml
55
+ # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
59
56
 
60
- name: Ultralytics Actions
57
+ # Ultralytics Actions https://github.com/ultralytics/actions
58
+ # This workflow formats code and documentation in PRs to Ultralytics standards
61
59
 
62
- on:
63
- issues:
64
- types: [opened]
65
- pull_request:
66
- branches: [main]
67
- types: [opened, closed, synchronize, review_requested]
60
+ name: Ultralytics Actions
68
61
 
69
- permissions:
70
- contents: write # Modify code in PRs
71
- pull-requests: write # Add comments and labels to PRs
72
- issues: write # Add comments and labels to issues
62
+ on:
63
+ issues:
64
+ types: [opened]
65
+ pull_request:
66
+ branches: [main]
67
+ types: [opened, closed, synchronize, review_requested]
73
68
 
74
- jobs:
75
- actions:
76
- runs-on: ubuntu-latest
77
- steps:
78
- - name: Run Ultralytics Actions
79
- uses: ultralytics/actions@main
80
- with:
81
- token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated token
82
- labels: true # Auto-label issues/PRs using AI
83
- python: true # Format Python with Ruff and docformatter
84
- prettier: true # Format YAML, JSON, Markdown, CSS
85
- swift: false # Format Swift (requires macos-latest)
86
- dart: false # Format Dart/Flutter
87
- spelling: true # Check spelling with codespell
88
- links: true # Check broken links with Lychee
89
- summary: true # Generate AI-powered PR summaries
90
- openai_api_key: ${{ secrets.OPENAI_API_KEY }} # Powers PR summaries, labels and comments
91
- brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution
92
- ```
69
+ permissions:
70
+ contents: write # Modify code in PRs
71
+ pull-requests: write # Add comments and labels to PRs
72
+ issues: write # Add comments and labels to issues
93
73
 
94
- 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`.
74
+ jobs:
75
+ actions:
76
+ runs-on: ubuntu-latest
77
+ steps:
78
+ - name: Run Ultralytics Actions
79
+ uses: ultralytics/actions@main
80
+ with:
81
+ token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated token
82
+ labels: true # Auto-label issues/PRs using AI
83
+ python: true # Format Python with Ruff and docformatter
84
+ prettier: true # Format YAML, JSON, Markdown, CSS
85
+ swift: false # Format Swift (requires macos-latest)
86
+ dart: false # Format Dart/Flutter
87
+ spelling: true # Check spelling with codespell
88
+ links: true # Check broken links with Lychee
89
+ summary: true # Generate AI-powered PR summaries
90
+ openai_api_key: ${{ secrets.OPENAI_API_KEY }} # Powers PR summaries, labels and reviews
91
+ brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution
92
+ ```
93
+
94
+ ## Standalone Actions
95
+
96
+ Reusable composite actions for common CI/CD tasks. Each can be used independently in your workflows.
97
+
98
+ ### 1. Retry Action
99
+
100
+ Retry failed commands with exponential backoff.
101
+
102
+ ```yaml
103
+ - uses: ultralytics/actions/retry@main
104
+ with:
105
+ command: npm install
106
+ max_attempts: 3
107
+ timeout_minutes: 5
108
+ ```
109
+
110
+ [**📖 Full Documentation →**](retry/README.md)
111
+
112
+ ### 2. Cleanup Disk Action
113
+
114
+ Free up disk space on GitHub runners by removing unnecessary packages and files.
115
+
116
+ ```yaml
117
+ - uses: ultralytics/actions/cleanup-disk@main
118
+ ```
119
+
120
+ [**📖 Full Documentation →**](cleanup-disk/README.md)
121
+
122
+ ### 3. Scan PRs Action
123
+
124
+ List open PRs across an organization and auto-merge eligible Dependabot PRs.
125
+
126
+ ```yaml
127
+ - uses: ultralytics/actions/scan-prs@main
128
+ with:
129
+ token: ${{ secrets.GITHUB_TOKEN }}
130
+ org: ultralytics # Optional: defaults to ultralytics
131
+ visibility: public # Optional: public, private, internal, or all
132
+ ```
133
+
134
+ [**📖 Full Documentation →**](scan-prs/README.md)
95
135
 
96
136
  ## Python Package
97
137
 
98
- Install the `ultralytics-actions` Python package directly with Pip:
138
+ Install `ultralytics-actions` for programmatic access to action utilities.
99
139
 
100
140
  [![PyPI - Version](https://img.shields.io/pypi/v/ultralytics-actions?logo=pypi&logoColor=white)](https://pypi.org/project/ultralytics-actions/)
101
141
  [![Ultralytics Downloads](https://static.pepy.tech/badge/ultralytics-actions)](https://clickpy.clickhouse.com/dashboard/ultralytics-actions)
102
142
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ultralytics-actions?logo=python&logoColor=gold)](https://pypi.org/project/ultralytics-actions/)
103
143
 
104
- ```sh
144
+ ```bash
105
145
  pip install ultralytics-actions
106
146
  ```
107
147
 
148
+ **Available Modules:**
149
+
150
+ - `actions.review_pr` - AI-powered PR review
151
+ - `actions.summarize_pr` - Generate PR summaries
152
+ - `actions.scan_prs` - Scan and manage organization PRs
153
+ - `actions.first_interaction` - Welcome message for new contributors
154
+ - And more in `actions/` directory
155
+
108
156
  ## 💡 Contribute
109
157
 
110
158
  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!
@@ -12,10 +12,13 @@
12
12
  # │ │ ├── github_utils.py
13
13
  # │ │ ├── openai_utils.py
14
14
  # │ │ └── common_utils.py
15
+ # │ ├── dispatch_actions.py
15
16
  # │ ├── first_interaction.py
16
17
  # │ ├── review_pr.py
18
+ # │ ├── scan_prs.py
17
19
  # │ ├── summarize_pr.py
18
20
  # │ ├── summarize_release.py
21
+ # │ ├── update_file_headers.py
19
22
  # │ └── update_markdown_code_blocks.py
20
23
  # └── tests/
21
24
  # ├── __init__.py
@@ -23,4 +26,4 @@
23
26
  # ├── test_summarize_pr.py
24
27
  # └── ...
25
28
 
26
- __version__ = "0.1.9"
29
+ __version__ = "0.2.1"