Skip to content

Commit a40e755

Browse files
Add Permissions to Ultralytics Actions format.yml (#73)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
1 parent 501762b commit a40e755

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-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

scoring/evaluation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2+
23
"""Utility methods for computing the performance metrics."""
34

45
from matching import Matching

scoring/matching.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2+
23
"""
34
Copyright 2018 Defense Innovation Unit Experimental All rights reserved.
45

scoring/rectangle.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2+
23
"""
34
Copyright 2018 Defense Innovation Unit Experimental All rights reserved.
45

scoring/score.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2+
23
"""
34
Copyright 2018 Defense Innovation Unit Experimental All rights reserved.
45

0 commit comments

Comments
 (0)