Skip to content

Commit

Permalink
Update README with PR Summary (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jan 18, 2024
1 parent 507bca2 commit 76f3aad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
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

0 comments on commit 76f3aad

Please sign in to comment.