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

Ultralytics Actions with OpenAI GPT-4 PR Summary #12678

Merged
merged 2 commits into from
Jan 28, 2024

Conversation

pderrenger
Copy link
Member

@pderrenger pderrenger commented Jan 28, 2024

This pull request adds an improved Ultralytics Actions workflow to automatically format code and documentation to the new Ultralytics official standards maintained at https://github.com/ultralytics/actions.

Six individual actions are run by default now including a new PR Summary utilizing OpenAI GPT-4. Disable individual actions by setting them to false or removing their line, i.e. delete 'markdown: true' line to disable markdown formatting.

Note that additional spellings have been added to the Ultralytics spelling dictionary and frontmatter is now ignored by markdown formatters per your feedback.

To customize an action use a pyproject.toml file in this repo. For details see https://github.com/ultralytics/actions.

# Ultralytics πŸš€ - AGPL-3.0 license
# Ultralytics Actions https://github.com/ultralytics/actions
# This workflow automatically formats code and documentation in PRs to official Ultralytics standards

name: Ultralytics Actions

on:
  push:
    branches: [main,master]
  pull_request:
    branches: [main,master]

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - name: Run Ultralytics Formatting
        uses: ultralytics/actions@main
        with:
          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_azure_api_key: ${{ secrets.OPENAI_AZURE_API_KEY }}
          openai_azure_endpoint: ${{ secrets.OPENAI_AZURE_ENDPOINT }}

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancement of the GitHub Actions formatting workflow in the ultralytics/yolov5 repository.

πŸ“Š Key Changes

  • Modified branch references to remove space, using main,master instead of main, master.
  • Changed hook from pull_request_target to pull_request.
  • Expanded the workflow to include automatic PR summarization with GPT-4.
  • Added summary option to trigger PR summaries.
  • Integrated openai_azure_api_key and openai_azure_endpoint secrets to support the new summarization feature.

🎯 Purpose & Impact

  • Ensures consistent branch reference formatting, potentially improving workflow triggers.
  • Transition to pull_request hook can streamline how PRs are handled and improve security.
  • The new PR summary feature, powered by GPT-4, aims to provide concise and informative summaries, enhancing the review process.
  • Users can expect more comprehensive automated checks and convenience in understanding PR content, which can lead to faster and more efficient collaboration. πŸ€–βœ¨

@glenn-jocher glenn-jocher changed the title Update Ultralytics Actions with OpenAI GPT-4 PR Summary Ultralytics Actions with OpenAI GPT-4 PR Summary Jan 28, 2024
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher merged commit 4878541 into master Jan 28, 2024
7 checks passed
@glenn-jocher glenn-jocher deleted the update-format-workflow-20240128211421 branch January 28, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants