Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README with PR Summary #60

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
uses: ultralytics/actions@main
with:
token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
python: true
markdown: true
spelling: false
links: false
summary: true # requires either 'openai_api_key' or 'openai_azure_api_key' and 'openai_azure_endpoint'
python: true # format Python code and docstrings
markdown: true # format Markdown and YAML
spelling: false # check spelling
links: false # check broken links
summary: true # print PR summary with GPT4 (requires 'openai_api_key' or 'openai_azure_api_key' and 'openai_azure_endpoint')
openai_azure_api_key: ${{ secrets.OPENAI_AZURE_API_KEY }}
openai_azure_endpoint: ${{ secrets.OPENAI_AZURE_ENDPOINT }}
#openai_api_key: ${{ secrets.OPENAI_API_KEY }}
# openai_api_key: ${{ secrets.OPENAI_API_KEY }}
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Ultralytics Actions automatically applies formats and updates:
- **Docstrings:** Utilizing [docformatter](https://github.com/myint/docformatter) for clean and standardized documentation comments.
- **Spell Check:** Employing [codespell](https://github.com/codespell-project/codespell) for catching common misspellings.
- **Broken Links Check:** Implementing [Lychee](https://github.com/lycheeverse/lychee) to report broken links in docs and markdown files.
- **PR Summary:** Generating concise, AI-powered summaries for pull requests using OpenAI GPT4, enhancing code review efficiency and clarity.

## πŸ›  How It Works

Expand All @@ -28,7 +29,7 @@ Upon integration, Ultralytics Actions triggers on:

To use this action in your Ultralytics repository:

1. **Create a Workflow File:** In your repository, create a file under `.github/workflows/`, e.g., `format-code.yml`.
1. **Create a Workflow File:** In your repository, create a file under `.github/workflows/`, e.g., `ultralytics-actions.yml`.

2. **Add the Action:** Use the Ultralytics Actions in your workflow file as follows:

Expand All @@ -38,8 +39,7 @@ To use this action in your Ultralytics repository:
on:
push:
branches: [main]
pull_request_target:
branches: [main]
types: [opened, closed, synchronize]

jobs:
format:
Expand All @@ -48,11 +48,13 @@ To use this action in your Ultralytics repository:
- name: Run Ultralytics Formatting
uses: ultralytics/actions@main
with:
token: ${{ secrets.GITHUB_TOKEN }} # automatically generated
python: true
markdown: true
spelling: true
links: true
token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
python: true # format Python code and docstrings
markdown: true # format Markdown and YAML
spelling: true # check spelling
links: true # check broken links
summary: true # print PR summary with GPT4 (requires 'openai_api_key' or 'openai_azure_api_key' and 'openai_azure_endpoint')
openai_api_key: # your OpenAI API key
```

3. **Customize:** Adjust the workflow settings as necessary for your project.
Expand Down