This is a plugin for monitoring GitHub repository releases and sending notifications.
Other languages: 中文
This plugin can monitor multiple GitHub repositories, notify users of new updates via QQ Bot, and supports customizable notification formats.
Install via nb-cli
Open the command line in the root directory of your NoneBot2 project and enter:nb plugin install nonebot-plugin-github-release-notifier
Install via package manager
Open the command line in the plugin directory of your NoneBot2 project and enter the corresponding command for your package manager:pip
pip install nonebot-plugin-github-release-notifier
Open the pyproject.toml file in the root directory of your NoneBot2 project and add the following to the [tool.nonebot] section:
plugins = ["nonebot-plugin-github-release-notifier"]
Before use, ensure that the SUPERUSERS configuration item in NoneBot2 is set.
Add the following required configuration items to the .env file in your NoneBot2 project:
| Config Item | Required | Default | Description |
|---|---|---|---|
| GITHUB_TOKEN | No | Empty string | Token for accessing the GitHub API |
| GITHUB_RETRIES | No | 3 | Maximum retry attempts for refreshing |
| GITHUB_RETRY_DELAY | No | 5 | Delay between each refresh retry (seconds) |
| GITHUB_LANGUAGE | No | "en_us" | Language for sending templates |
| GITHUB_SEND_FALIURE_GROUP | No | True | Notify group on failure |
| GITHUB_SEND_FALIURE_SUPERUSER | No | False | Notify superuser on failure |
| GITHUB_DEFAULT_CONFIG_SETTING | No | True | Monitor all events by default when adding a repo |
| GITHUB_SEND_IN_MARKDOWN | No | False | Send messages as Markdown images |
| GITHUB_SEND_DETAIL_IN_MARKDOWN | No | True | Send details (pr/issue/release) as Markdown images |
| GITHUB_SEND_PREV_DETAILS | No | False | Whether send previous details when adding a new repository |
| GITHUB_UPLOAD_REMOVE_OLDER_VER | No | True | Remove old versions when uploading release files (in development) |
| GITHUB_THEME | No | "dark" | (For issue/pull request comments) Page rendering style ["light","dark"] |
v0.1.9 removed support for adding group repo via .env. Please use commands for related features.
v0.1.10 removed custom template output format, please use github_language configuration for related templates.
All commands not restricted to admins or SUPERUSERS have a 15s cooldown.
For private messages, add the group ID at the end of the command, e.g. /repo.add <user>/<repo> <group_id>
| Command | Permission | Requires @ | Scope | Description |
|---|---|---|---|---|
| /add_group_repo or /repo.add | SUPERUSERS or Admins | No | Private & Group | Add group-repository mapping |
| /del_group_repo or /repo.delete or /repo.del | SUPERUSERS or Admins | No | Private & Group | Delete group-repository mapping |
| /change_group_repo_cfg or /repo.config or /repo.cfg | SUPERUSERS or Admins | No | Private & Group | Modify repository configuration (supports boolean and string configs, see below) |
| /show_group_repo or /repo.show | SUPERUSERS or Admins | No | Private & Group | View group-repository mapping |
| /refresh_group_repo or /repo.refresh | SUPERUSERS or Admins | No | Private & Group | Refresh GitHub status |
| /repo_info or /repo.info | Everyone | No | Private & Group | View repository details |
| /check_api_usage | Everyone | No | Private & Group | View GitHub API usage |
- Customizable notification formats
- Add help documentation
- Reset database structure
- Markdown message support
- Markdown to image rendering
- Issue/PR details support
- Forward issue/PR comments
- Render GitHub page for PR/issue display
This plugin is distributed under the MIT License. See here for details.
v0.1.10 Added issue comment forwarding support, using cscs181/QQ-GitHub-Bot to render new pages
v0.1.9 Removed support for adding group repo via .env, please use commands for related features
v0.1.8 Known issues fixed, readme updated
v0.1.3-v0.1.7 Bug fixes, published to nonebot
V0.1.2 Updated release information
V0.1.0-V0.1.1 Main program completed, features adapted, ready for release
Some of the plugin code is derived from/inspired by cscs181/QQ-GitHub-Bot, distributed under the MIT License, details can be found here.