pr-description-generator
v1.0.1
Published
GitHub Actions - pull request descriptions generated by OpenAI
Downloads
8
Readme
PR Description Generator
GitHub Actions - pull request description generated by OpenAI
name: Generate PR Description
on:
pull_request:
types: [opened]
jobs:
generate-description:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate PR Description
uses: SearchKings/pr-description-generator@master
with:
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}Configuration
You can customize the action by providing the following inputs:
| Input | Description | Required | Default |
| ------------------- | --------------------------------------------------------------- | -------- | ------------------------ |
| openai_api_key | Your OpenAI API Key | Yes | N/A |
| openai_model | OpenAI model to use (e.g., gpt-4, gpt-3.5-turbo) | No | gpt-4o-mini |
| github_token | GitHub token with repo permissions | Yes | ${{ github.token }} |
| temperature | Sampling temperature for OpenAI (0.0 to 1.0) | No | 0.7 |
| user_prompt | The custom user prompt to send to OpenAI | No | The basic "Instructions" |
| replace_mode | Replace the existing PR description | No | 'false' |
| skip_diff_folders | Exclude paths from the Git diff command, a comma-separated list | No | N/A, example: build,dist |
Outputs
The action provides the following outputs:
pr_number: The number of the pull request updateddescription: The generated pull request description
Credits
This action was inspired by Auto-generate PR Description.
