Skip to content

57blocks/ai-powered-pr-description-generator

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Powered PR Description Generator

Automatically generates descriptive summaries for pull requests using AI, enhancing clarity and context for reviewers.

Table of Contents

Features

  • Automatically generates descriptions for pull requests.
  • Supports multiple AI models (e.g., Gemini, OpenAI).
  • Integrates seamlessly with GitHub workflows.
  • Executes on pull request creation and commit push events.
  • Written in TypeScript for type safety and maintainability.

Getting Started

To get started with the AI-Powered PR Description Generator, follow the instructions below to set up your environment and configure the project.

Installation

  • Prerequisites

    • Node.js (version 20 or above)
    • npm (Node package manager)
  • Clone the repository:

    git clone https://github.com/your-username/ai-powered-pr-description-generator.git
    cd ai-powered-pr-description-generator
  • Install the dependencies:

    npm install & npm run build

Configuration

Before using the generator, you need to configure the following secrets in your GitHub repository settings(https://github.com/your-repo/settings/secrets/actions):

  • GEMINI_API_KEY: Your API key for the Gemini model.
  • OPENAI_API_KEY: Your API key for the OpenAI model (if applicable).

GITHUB_TOKEN should be required (https://github.com/settings/tokens), it needs permission to modify the pull request.

Usage

Once configured, the action will automatically execute whenever a pull request is created or a commit is pushed to the repository.

GitHub Workflow

Here's an example of how to set up your GitHub Actions workflow file (.github/workflows/description-generator.yml):

Supported AI Models

The project currently supports the following AI models for generating descriptions:

  • Gemini: An AI model that provides concise and relevant descriptions for pull requests.
  • OpenAI: A more advanced AI model that can generate detailed and nuanced descriptions. You can configure which AI model to use in your workflow settings.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.

Fork the repository. Create your feature branch: git checkout -b feature/new-feature. Commit your changes: git commit -m 'Add some feature'. Push to the branch: git push origin feature/new-feature. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Summary of Additions and Improvements:

  • Configuration: Added details about environment variables needed for setup.
  • Usage: Included a command for local execution.
  • GitHub Workflow: Provided a full example of a GitHub Actions workflow.
  • Building the Project: Clarified the build process.
  • Contributing: Maintained clear instructions for contributing to the project.

Feel free to modify any sections further to better fit your project's specifics!

About

Automatically generates descriptive summaries for pull requests using AI, enhancing clarity and context for reviewers.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors