|
1 | 1 | # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
2 | 2 |
|
3 | 3 | # Ultralytics Actions https://github.com/ultralytics/actions
|
4 |
| -# This workflow automatically formats code and documentation in PRs to official Ultralytics standards |
| 4 | +# This workflow formats code and documentation in PRs to Ultralytics standards |
5 | 5 |
|
6 | 6 | name: Ultralytics Actions
|
7 | 7 |
|
|
12 | 12 | branches: [main]
|
13 | 13 | types: [opened, closed, synchronize, review_requested]
|
14 | 14 |
|
| 15 | +permissions: |
| 16 | + contents: write # Modify code in PRs |
| 17 | + pull-requests: write # Add comments and labels to PRs |
| 18 | + issues: write # Add comments and labels to issues |
| 19 | + |
15 | 20 | jobs:
|
16 |
| - format: |
| 21 | + actions: |
17 | 22 | runs-on: ubuntu-latest
|
18 | 23 | steps:
|
19 |
| - - name: Run Ultralytics Formatting |
| 24 | + - name: Run Ultralytics Actions |
20 | 25 | uses: ultralytics/actions@main
|
21 | 26 | with:
|
22 |
| - token: ${{ secrets._GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
23 |
| - labels: true # autolabel issues and PRs |
24 |
| - python: true # format Python code and docstrings |
25 |
| - prettier: true # format YAML, JSON, Markdown and CSS |
26 |
| - spelling: true # check spelling |
27 |
| - links: false # check broken links |
28 |
| - summary: true # print PR summary with GPT4o (requires 'openai_api_key') |
29 |
| - openai_api_key: ${{ secrets.OPENAI_API_KEY }} |
| 27 | + token: ${{ secrets._GITHUB_TOKEN || secrets.GITHUB_TOKEN }} # Auto-generated token |
| 28 | + labels: true # Auto-label issues/PRs using AI |
| 29 | + python: true # Format Python with Ruff and docformatter |
| 30 | + prettier: true # Format YAML, JSON, Markdown, CSS |
| 31 | + spelling: true # Check spelling with codespell |
| 32 | + links: false # Check broken links with Lychee |
| 33 | + summary: true # Generate AI-powered PR summaries |
| 34 | + openai_api_key: ${{ secrets.OPENAI_API_KEY }} # Powers PR summaries, labels and comments |
| 35 | + brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution |
0 commit comments