OpenAI to generate pull request descriptions
13 March 2023
Introducing a GitHub Action that can save you time and effort when it comes to writing pull request descriptions.
platisd/openai-pr-description
uses the power of OpenAI to automatically fill in the description of your pull request,
based on the title and contents.
It’s like having ChatGPT help you out!
But it’s not just about merely summarizing the changes or listing the files you modified. The Action is designed to focus on why the changes are important, rather than just what they are. This can help convey the value of your changes to other team members, making it easier for them to understand and review your work.
Another aspect of this Action is that it won’t overwrite any existing descriptions you’ve written. It only runs when a description is missing, so you don’t have to worry about accidentally losing your own words.
But how much does it cost? The OpenAI API isn’t free, but it’s been quite affordable so far. For around $0.10, you can generate descriptions for 15-20 pull requests.
If you’re interested in trying out this time-saving and quality improving tool, here’s how to get started:
- Create an account on OpenAI and get your API key.
- Add the API key as a secret in your repository’s settings.
- Create a workflow YAML file, with the necessary code.
And that’s it! You’ll be on your way to more meaningful and effective pull request descriptions in no time.
You will find everything you need to get started with the Action at platisd/openai-pr-description on GitHub.