Skip to content

Commit 13a095b

Browse files
committed
Update Ultralytics Actions permissions
1 parent bc1a45e commit 13a095b

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/format.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
22

33
# 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
55

66
name: Ultralytics Actions
77

@@ -12,18 +12,24 @@ on:
1212
branches: [main]
1313
types: [opened, closed, synchronize, review_requested]
1414

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+
1520
jobs:
16-
format:
21+
actions:
1722
runs-on: ubuntu-latest
1823
steps:
19-
- name: Run Ultralytics Formatting
24+
- name: Run Ultralytics Actions
2025
uses: ultralytics/actions@main
2126
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

Comments
 (0)