Skip to main content

按群订阅 Git 仓库更新的 NoneBot2 插件,支持多仓库、多分支定时拉取

Project description

logo

nonebot-plugin-git-poller

LICENSE pypi python uv codecov

按群订阅 Git 仓库更新的 NoneBot2 插件,支持多仓库、多分支定时拉取,自动推送 commit 更新摘要并上传源码压缩包。

安装

在 NoneBot 项目目录中安装插件:

uv add nonebot-plugin-git-poller

pyproject.toml 中加载插件:

[tool.nonebot]
plugins = ["nonebot_plugin_git_poller"]

配置

配置项 必填 默认值 说明
git_poller_default_schedule 每日04:00 新关注仓库的默认定时规则;留空关闭默认定时注册。
git_poller_timezone Asia/Shanghai 定时任务时区。
git_poller_proxy HTTP/HTTPS Git 拉取代理。
git_poller_timeout 60.0 HTTP/HTTPS Git 拉取超时,单位秒。
git_poller_archive_password 全局默认压缩包密码;为空时默认不设置密码。
git_poller_file_base_url 条件 上传压缩包时使用的 NoneBot HTTP 服务根地址;Bot 和 OneBot/NapCat 不在同一个文件系统时必须配置,例如 http://nonebot:8088。

指令

/关注仓库 仓库url [--分支名]
/取关仓库 仓库url [--分支名]
/设置仓库 仓库url [--分支名]
/拉取仓库 仓库url [--分支名]
/仓库摘要 仓库url [--分支名]
/仓库列表

带 URL 的命令都支持可选分支后缀,例如 /关注仓库 https://example.test/repo.git --dev/关注仓库 不写分支时追踪远端默认分支;其他命令不写分支时优先使用本群本仓库的唯一订阅,若同仓库关注了多个分支则需要写 --分支名

/关注仓库 在当前群关注仓库。同一个群可以关注同一仓库的不同分支。

/取关仓库 移除当前群的对应仓库分支订阅,不影响其他群。

/设置仓库 进入设置流程。Bot 会回复:

输入设置数字选项
1. 修改当前仓库推送抓取时间
2. 修改当前仓库上传压缩包密码(选择后输入无则清除当前仓库密码回到全局默认)

回复 1 后,下一条消息必须是合法定时格式。回复 2 后,下一条消息会保存为当前仓库压缩包密码,此时输入 会清除当前仓库密码并回到全局默认。输入非法会取消。

/仓库列表 显示当前群关注的仓库、分支、定时、启用状态、last_success_sha 和压缩包密码来源。

/拉取仓库 立即拉取当前群已关注的仓库,上传最新的源码压缩包。

/仓库摘要 仅拉取远端并展示本群记录与远端 HEAD 的差异。

定时格式

支持:

每日hh:mm
每x天hh:mm
周xhh:mm

每x天x 使用 1 到 30 的整数;周x 只支持汉字 一二三四五六日/天

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_git_poller-0.1.5.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_git_poller-0.1.5-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_git_poller-0.1.5.tar.gz.

File metadata

  • Download URL: nonebot_plugin_git_poller-0.1.5.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nonebot_plugin_git_poller-0.1.5.tar.gz
Algorithm Hash digest
SHA256 dd573da8b7fe80d0d97a26d480d79081ee76158c720cada1d89f43e286735c99
MD5 288ff07122b31bdb5fe1d96cf786e4d0
BLAKE2b-256 e6c805fdc0cbc4350a9d02f37fb52eadc25566e59b0da0e0f7646fac836b7f4c

See more details on using hashes here.

File details

Details for the file nonebot_plugin_git_poller-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_git_poller-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nonebot_plugin_git_poller-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b3cdb395c5a7179b19b78515fb91817dae0a69387b80475b05e1905b70595fd7
MD5 2e35fd268183f255425ad6c38b63410e
BLAKE2b-256 75dee25264e0c6fbd14c1056b65eac19222c62da1f432ebb026fb7a914cc1623

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page