Skip to content

OpenAI: Generate Pull Request Title and Description

Actions
Generate Pull Request Title and Description using OpenAI API
v1.0.3
Latest
Star (3)

header

OpenAI Generate PR Title and Description

This workflow uses an article generation model by OpenAI to generate the title and body of a pull request.

Usage

name: OpenAI Generate PR Title and Description

on:
  pull_request:
    branches:
      - main
    types:
      - opened
      - synchronize

jobs:
  pull-request:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    permissions:
      pull-requests: write
      contents: read
    if: contains(fromJSON('["renovate[bot]"]'), github.event.pull_request.user.login) == false
    steps:
      - uses: actions/checkout@v4
      - uses: tqer39/[email protected]
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          openai-api-key: ${{ secrets.OPENAI_API_KEY }}

Inputs

github-token

Required GitHub token. Specify ${{ secrets.GITHUB_TOKEN }}.

openai-api-key

Required OpenAI API key. Specify ${{ secrets.OPENAI_API_KEY }}.

openai-model

Optional OpenAI model to use. Default is gpt-3.5-turbo.

Note

  • 📝 The default model is gpt-3.5-turbo and can be used for free in the OpenAI API specification. If you use another model, you may incur charges for the OpenAI API.

commit-log-history-limit

Optional Limit of commit log history. Default is 70.

Note

  • 📝 Due to the limit of the number of tokens that can be used in one request in the OpenAI API specification, limiting the number of commit log histories can prevent request failures.

Contribution

If you find any issues or have improvements, please create an Issue or submit a Pull Request.

License

This action is released under the MIT license. For more information, see LICENSE.

OpenAI: Generate Pull Request Title and Description is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Generate Pull Request Title and Description using OpenAI API
v1.0.3
Latest

OpenAI: Generate Pull Request Title and Description is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.