Code reviews are a crucial part of the development process. However, the manual process of reviewing code changes and generating changelogs can be time-consuming and error-prone. Our project aims to solve these challenges by automating the process of generating PCR with changelogs and performing code reviews.
Our solution leverages AI tools and automation to streamline the process of PCR generation with changelogs. We will use Bitbucket pipelines to run the code, fetch the task number from the commit or PR title, and create a Confluence page for the PCR. The Confluence page will include the task title, status, minor description, label, and assignee name.
To generate the changelog, we will use the ChatGPT API, an open AI tool that can generate human-like text. The API will analyze the commit messages and generate a summary of the changes, which we will add to the Confluence page.
For code analysis, we will use PHPStan, a static analysis tool for PHP. This tool will generate a report on the code quality. Additionally, we will use OpenAI to perform code reviews and provide suggestions for code improvements based on our coding standards.
- Fork and Clone the repository
- Install dependencies:
composer install
To use our PCR automation tool, follow these steps:
- Make sure you have a Bitbucket account with the appropriate permissions.
- Set up your project in Bitbucket and enable pipelines.
- Add the necessary scripts to your project's
package.jsonfile. - Create a
confluence.config.jsfile with your Confluence credentials. - Commit your code changes and push them to Bitbucket.
- Bitbucket pipelines will automatically run the code, fetch the task number from the commit or PR title, and create a Confluence page for the PCR.
- The ChatGPT API will analyze the commit messages and generate a summary of the changes, which will be added to the Confluence page.
- PHPStan will generate a report on the code quality, and OpenAI will perform code reviews and provide suggestions for code improvements.
This project is licensed under the MIT License. See the LICENSE file for details.