Potential fix for format.yml missing permissions (#20556)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
35ccd9bf10
commit
169fbc51fe
29
.github/workflows/format.yml
vendored
29
.github/workflows/format.yml
vendored
@ -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
|
||||
|
||||
@ -14,21 +14,28 @@ 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
|
||||
swift: false # Format Swift (requires macos-latest)
|
||||
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
|
||||
first_issue_response: |
|
||||
👋 Hello @${{ github.actor }}, thank you for your interest in Ultralytics 🚀! We recommend a visit to the [Docs](https://docs.ultralytics.com/) for new users where you can find many [Python](https://docs.ultralytics.com/usage/python/) and [CLI](https://docs.ultralytics.com/usage/cli/) usage examples and where many of the most common questions may already be answered.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user