# PRGenius
PRGenius automates the creation of pull requests on GitHub by leveraging OpenAI's GPT-3 to generate meaningful and detailed descriptions from your commit messages. It streamlines the PR process, making it easier and more efficient for developers.
## Features
- **Automated PR Descriptions**: Generate detailed PR descriptions from commit messages using GPT-3.
- **Flexible**: Works with any GitHub repository, supporting customizable base and head branches.
- **Easy Integration**: Seamlessly integrates into your development workflow with minimal setup.
## Getting Started
### Prerequisites
- Python 3.7+
- A GitHub account
- An OpenAI API key
### Installation
Install PRGenius using pip:
```bash
pip install prgenius
```
### Configuration
Before using PRGenius, configure your environment with the necessary credentials:
1. **GitHub Token**: Create a GitHub Personal Access Token (PAT) with repository access. Follow the instructions on GitHub to [create a token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token).
2. **OpenAI API Key**: Obtain an API key by creating an account at [OpenAI](https://openai.com/) and accessing your API keys section.
Set the following environment variables:
```plaintext
GITHUB_REPO_OWNER=<your-github-username>
GITHUB_REPO_NAME=<your-repository-name>
GITHUB_TOKEN=<your-github-token>
OPENAI_API_KEY=<your-openai-api-key>
```
You can optionally specify base branch in here as
```plaintext
GITHUB_REPO_BASE_BRANCH=<your-default-branch-in-github>
```
By default GITHUB_REPO_BASE_BRANCH will be 'develop'
These can be set in a `.env` file in the root of your project or exported in your shell session.
### Usage
After setting up your environment, PRGenius can be used to automatically create pull requests with rich, AI-generated descriptions based on your commit messages.
To use PRGenius, navigate to your project directory and run:
```bash
prgenius create
```
This command will create a new pull request on GitHub using the commits that are on your current branch but not on your base branch (default `develop`).
#### Advanced Usage
For workflows requiring an immediate merge after creating the pull request, PRGenius offers an auto-merge feature. To create and attempt to auto-merge a pull request, use:
```bash
prgenius createmerge
```
This command attempts to merge the newly created pull request if the predefined conditions are met (e.g., passing all status checks). Ensure your GitHub token has sufficient permissions to merge pull requests in the repository.
**Note:** The effectiveness of the auto-merge feature depends on your repository's settings and the permissions associated with your GitHub token. It's recommended to review and configure branch protection rules and merge options accordingly.
## Contributing
We welcome contributions to PRGenius! If you have suggestions for improvements or encounter a bug, please feel free to contribute. Here's how:
1. Fork the project repository.
2. Create your feature branch (`git checkout -b feature/AmazingFeature`).
3. Commit your changes (`git commit -am 'Add some AmazingFeature'`).
4. Push to the branch (`git push origin feature/AmazingFeature`).
5. Open a pull request for review.
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our code of conduct and the process for submitting pull requests to us.
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. This means you are free to use, modify, and distribute the project as you see fit, as long as you include the original copyright and permission notice in any copies or substantial portions of the software.
## Acknowledgments
- Thanks to OpenAI for providing the GPT-3 API, enabling the automation of rich text generation.
- Appreciation goes to GitHub for their robust platform and APIs that facilitate software development and collaboration.
- A shoutout to all the developers and contributors who invest their time and effort into open source projects, making tools like PRGenius possible.
For more detailed information on advanced configurations, features, and usage examples, please refer to the [official documentation](https://github.com/bannawandoor27/PRGenius).
Remember, PRGenius is designed to make your development workflow more efficient and automated. We hope it helps you streamline your PR process and focus more on development.
Raw data
{
"_id": null,
"home_page": "https://github.com/yourusername/PRGenius",
"name": "PRGenius",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "GitHub PR automation GPT-3",
"author": "Hasanul Banna",
"author_email": "bannawandoor@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9b/93/1a3b2d968fd22e368493cc9a445f2326505a647d4a193c29e5f7c616fbe4/PRGenius-1.0.1.tar.gz",
"platform": null,
"description": "# PRGenius\n\nPRGenius automates the creation of pull requests on GitHub by leveraging OpenAI's GPT-3 to generate meaningful and detailed descriptions from your commit messages. It streamlines the PR process, making it easier and more efficient for developers.\n\n## Features\n\n- **Automated PR Descriptions**: Generate detailed PR descriptions from commit messages using GPT-3.\n- **Flexible**: Works with any GitHub repository, supporting customizable base and head branches.\n- **Easy Integration**: Seamlessly integrates into your development workflow with minimal setup.\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.7+\n- A GitHub account\n- An OpenAI API key\n\n### Installation\n\nInstall PRGenius using pip:\n\n```bash\npip install prgenius\n```\n\n### Configuration\n\nBefore using PRGenius, configure your environment with the necessary credentials:\n\n1. **GitHub Token**: Create a GitHub Personal Access Token (PAT) with repository access. Follow the instructions on GitHub to [create a token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token).\n\n2. **OpenAI API Key**: Obtain an API key by creating an account at [OpenAI](https://openai.com/) and accessing your API keys section.\n\nSet the following environment variables:\n\n```plaintext\nGITHUB_REPO_OWNER=<your-github-username>\nGITHUB_REPO_NAME=<your-repository-name>\nGITHUB_TOKEN=<your-github-token>\nOPENAI_API_KEY=<your-openai-api-key>\n```\n\nYou can optionally specify base branch in here as \n\n```plaintext\nGITHUB_REPO_BASE_BRANCH=<your-default-branch-in-github>\n\n```\nBy default GITHUB_REPO_BASE_BRANCH will be 'develop'\n\nThese can be set in a `.env` file in the root of your project or exported in your shell session.\n\n### Usage\n\nAfter setting up your environment, PRGenius can be used to automatically create pull requests with rich, AI-generated descriptions based on your commit messages. \n\nTo use PRGenius, navigate to your project directory and run:\n\n```bash\nprgenius create\n```\n\nThis command will create a new pull request on GitHub using the commits that are on your current branch but not on your base branch (default `develop`).\n\n#### Advanced Usage\n\nFor workflows requiring an immediate merge after creating the pull request, PRGenius offers an auto-merge feature. To create and attempt to auto-merge a pull request, use:\n\n```bash\nprgenius createmerge\n```\n\nThis command attempts to merge the newly created pull request if the predefined conditions are met (e.g., passing all status checks). Ensure your GitHub token has sufficient permissions to merge pull requests in the repository.\n\n**Note:** The effectiveness of the auto-merge feature depends on your repository's settings and the permissions associated with your GitHub token. It's recommended to review and configure branch protection rules and merge options accordingly.\n\n## Contributing\n\nWe welcome contributions to PRGenius! If you have suggestions for improvements or encounter a bug, please feel free to contribute. Here's how:\n\n1. Fork the project repository.\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`).\n3. Commit your changes (`git commit -am 'Add some AmazingFeature'`).\n4. Push to the branch (`git push origin feature/AmazingFeature`).\n5. Open a pull request for review.\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our code of conduct and the process for submitting pull requests to us.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. This means you are free to use, modify, and distribute the project as you see fit, as long as you include the original copyright and permission notice in any copies or substantial portions of the software.\n\n## Acknowledgments\n\n- Thanks to OpenAI for providing the GPT-3 API, enabling the automation of rich text generation.\n- Appreciation goes to GitHub for their robust platform and APIs that facilitate software development and collaboration.\n- A shoutout to all the developers and contributors who invest their time and effort into open source projects, making tools like PRGenius possible.\n\nFor more detailed information on advanced configurations, features, and usage examples, please refer to the [official documentation](https://github.com/bannawandoor27/PRGenius).\n\nRemember, PRGenius is designed to make your development workflow more efficient and automated. We hope it helps you streamline your PR process and focus more on development.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Automates PR creation on GitHub using GPT-3 for description generation based on commit messages.",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/yourusername/PRGenius"
},
"split_keywords": [
"github",
"pr",
"automation",
"gpt-3"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "04424472e78f0c69c73905c718507a7bb9ec94bef44905c471ff84921c01a3e0",
"md5": "cb8d47fc181b3bf52658f1bd8a3b13fd",
"sha256": "4777bda067feecb0c4b2ae8afeff7d58cd79cd7e37aeb5a2762ceceed3b33e79"
},
"downloads": -1,
"filename": "PRGenius-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cb8d47fc181b3bf52658f1bd8a3b13fd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8657,
"upload_time": "2024-03-07T13:47:00",
"upload_time_iso_8601": "2024-03-07T13:47:00.077623Z",
"url": "https://files.pythonhosted.org/packages/04/42/4472e78f0c69c73905c718507a7bb9ec94bef44905c471ff84921c01a3e0/PRGenius-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9b931a3b2d968fd22e368493cc9a445f2326505a647d4a193c29e5f7c616fbe4",
"md5": "93a8144d6a7df68d8d6a02e7a34f6041",
"sha256": "371500a9dd0a0618e5805ba235278f34d8b8bffaa8c1063a29724864f945d868"
},
"downloads": -1,
"filename": "PRGenius-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "93a8144d6a7df68d8d6a02e7a34f6041",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7566,
"upload_time": "2024-03-07T13:47:06",
"upload_time_iso_8601": "2024-03-07T13:47:06.769134Z",
"url": "https://files.pythonhosted.org/packages/9b/93/1a3b2d968fd22e368493cc9a445f2326505a647d4a193c29e5f7c616fbe4/PRGenius-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-07 13:47:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yourusername",
"github_project": "PRGenius",
"github_not_found": true,
"lcname": "prgenius"
}