Warning
Our App is still in the testing phase, so we maybe clear user data. Please be careful when using it.
In a nutshell, to better manage projects, we need an enhanced Issue management tool. This is why I created this project. By configuring bots with repository files, everyone can freely customize the bot. The bot will automatically handle repository events based on the configuration file.
This project was inspired by the ai-pr-reviewer project
However, it's unfortunate that they have decided to close their repository and code. Using it requires additional payment, and although payment is necessary, I don't like closed systems and monthly billing. I prefer open, pay-as-you-go (or self-hosted) services.
This repository includes a configuration file template, which you can use to set up your bot. Sensitive information such as keys can be configured through my panel.
- Install the App: Click Install to your Repo.
- Get Repo Token: Add apikeys and other sensitive information to the App Dashboard.
- Build the
.nerve.toml
File: Create a configuration file based on the template. Example
[!INFO] The panel is only used to store API-related keys. You fill in the UUID to your repository, and GithubApp collaborates with the repository to finally obtain the customized configuration.
Feature | Description |
---|---|
🌐 Dashboard | Intuitive web panel for managing sensitive data and key configurations. |
📂 Auto Labeling | Automatically label issues based on the configuration file. |
📝 Issue Closed Report | Generate a report when an issue is closed. |
📌 Issue Title Standard | Standardize issue titles. |
🗂 |
Generate a summary of issues based on the configuration file. |
📦 |
Generate release notes based on the configuration file. |
📚 |
Automatically translate documentation. |
sequenceDiagram
participant User
participant Dashboard
participant Repository
participant GithubApp
participant Robot
User ->> Dashboard: Provides sensitive information
Dashboard ->> User: Returns UUID
User ->> Repository: Provides UUID
Repository ->> GithubApp: Provides UUID and requests operation
GithubApp ->> Robot: Verifies repository with UUID
Robot ->> GithubApp: Confirms repository validity
GithubApp -->> Repository: Executes operation
Although the project may seem complex, adding new operations is actually quite simple. GitHub passes events through webhooks, and we only need to handle these events and then execute our operations.
Please open the main.py file and add your custom operations.
Here is an example of a new listener:
webhook_handler = ...
git_integration = ...
get_repo_setting = ...
logger = ...
from core.webhook.event_type import IssueComment
@webhook_handler.listen(IssueComment, action=IssueComment.CREATED, unique_id="uuid")
async def handle_issue_comment(event: IssueComment.CREATED_EVENT):
logger.info("Received IssueComment.CREATED event")
repo_setting = get_repo_setting(
repo_name=event.repository.full_name,
repo=event.repository.get_repo(git_integration)
)
# repo_setting is the content of the .nerve.toml file
issue = event.repository.get_issue(integration=git_integration, issue_number=event.issue.number)
comment = issue.create_comment(f"Hello World!")
issue.get_comment(comment.id).edit("Hello World! Edited")
print(f"Issue: {event.issue.title}")
print(f"Comment: {event.comment.body}")
print(f"Repo: {event.repository.full_name}")
The same event can have multiple listeners, as long as each listener has a different unique_id
.
To deploy the app locally, follow these easy steps:
pdm install
npm install
cp .env.example .env
nano .env
pm2 start pm2.json
Special thanks to these resources that made this project possible:
- chmouel/gosmee
- octokit/webhooks
- GitHub Webhooks Documentation
- GitHub Webhooks Validation
- PyGithub Examples
This project is licensed under the MIT License with Non-Commercial Clause - see the LICENSE file for details.
You are free to use this software for any non-commercial purposes.
For commercial use, please contact us to obtain a commercial license.
We welcome contributions! Please check out our contributing guidelines for more information.
If you find this project helpful, don't forget to give us a star! ⭐️
Happy Coding! 💻