44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
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:
|
|
# Dogfood this repo's own action: PR events run the PR's action.yml, issue events run main's
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
|
|
- name: Run Ultralytics Actions
|
|
uses: ./
|
|
with:
|
|
token: ${{ secrets._GITHUB_TOKEN || github.token }} # Auto-generated fallback
|
|
labels: true # Auto-label issues/PRs using AI
|
|
python: true # Format Python with Ruff
|
|
python_docstrings: true # Format Python docstrings
|
|
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
|
|
review: true # PR reviews
|
|
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
|
|
# anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution
|