Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

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

name: Ultralytics Actions

Expand All @@ -12,18 +12,24 @@ on:
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:
format:
actions:
runs-on: ubuntu-latest
steps:
- name: Run Ultralytics Formatting
- name: Run Ultralytics Actions
uses: ultralytics/actions@main
with:
token: ${{ secrets._GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
labels: true # autolabel issues and PRs
python: true # format Python code and docstrings
prettier: true # format YAML, JSON, Markdown and CSS
spelling: true # check spelling
links: false # check broken links
summary: true # print PR summary with GPT4o (requires 'openai_api_key')
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
token: ${{ secrets._GITHUB_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
spelling: true # Check spelling with codespell
links: false # 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
Loading