Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
681 changes: 10 additions & 671 deletions LICENSE

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
OneBot GitHub Webhook
Copyright 2025 AptS-1547

This product includes software developed by AptS-1547 (https://github.com/AptS-1547).

This software uses the following third-party libraries that are distributed
under their own licenses:

- FastAPI (https://fastapi.tiangolo.com/) - MIT License
- Pydantic (https://pydantic-docs.helpmanual.io/) - MIT License
- Pydantic-settings (https://github.com/pydantic/pydantic-settings) - MIT License
- aiohttp (https://docs.aiohttp.org/) - Apache License 2.0
- PyYAML (https://pyyaml.org/) - MIT License
- Uvicorn (https://www.uvicorn.org/) - BSD License
- fnmatch (Python Standard Library) - Python Software Foundation License

All dependencies and their transitive dependencies are subject to their own licenses.
Please see each project for full licensing details.
39 changes: 21 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
<h1 align="center">
OneBot GitHub Webhook
</h1>
<div align="center">
<img src="./docs/src/resources/logo.png" alt="OneBot GitHub Webhook Logo">
</div>

<p align="center">
一个用于接收 GitHub Webhook 并通过 OneBot 协议将推送通知转发到 QQ 群的服务。
</p>
<div align="center">

<p align="center">
<a href="https://www.codefactor.io/repository/github/AptS-1547/onebot-github-webhook/">
<img src="https://www.codefactor.io/repository/github/AptS-1547/onebot-github-webhook/badge" alt="CodeFactor" />
</a>
# OneBot GitHub Webhook

<a href="https://github.com/AptS-1547/onebot-github-webhook/activity">
<img src="https://img.shields.io/github/last-commit/AptS-1547/onebot-github-webhook/master" alt="Last Commit"/>
</a>
_✨ GitHub Webhook 推送消息到 QQ 群 ✨_

<a href="./LICENSE">
<img src="https://img.shields.io/github/license/AptS-1547/onebot-github-webhook" alt="GPL-3.0\"/>
</a>
</p>
<a href="https://www.codefactor.io/repository/github/AptS-1547/onebot-github-webhook/">
<img src="https://www.codefactor.io/repository/github/AptS-1547/onebot-github-webhook/badge" alt="CodeFactor" />
</a>

<a href="https://github.com/AptS-1547/onebot-github-webhook/activity">
<img src="https://img.shields.io/github/last-commit/AptS-1547/onebot-github-webhook/master" alt="Last Commit"/>
</a>

<a href="./LICENSE">
<img src="https://img.shields.io/github/license/AptS-1547/onebot-github-webhook" alt="Apache License 2.0" />
</a>

<img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="python">
</div>

## 功能特点

Expand Down Expand Up @@ -347,4 +350,4 @@ A: 本程序暂时不支持推送到多个 QQ 机器人

## 许可证

本项目采用 GPL-3.0 许可证。
本项目采用 [Apache License 2.0](LICENSE) 许可证。
15 changes: 14 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
# Copyright 2025 AptS-1547
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
OneBot GitHub Webhook 入口文件
本文件用于接收 GitHub Webhook 事件,并将其转发到配置的 OneBot 目标。
作者:AptS:1547
版本:0.1.0-alpha
日期:2025-04-17
本程序遵循 GPL-3.0 许可证
本程序遵循 Apache License 2.0 许可证
"""

import logging
Expand Down
2 changes: 1 addition & 1 deletion docs/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ A: 本程序暂时不支持推送到多个 QQ 机器人

## 许可证

本项目采用 GPL-3.0 许可证。
本项目采用 [Apache License 2.0](LICENSE) 许可证。
41 changes: 24 additions & 17 deletions docs/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@
OneBot GitHub Webhook
</h1>

<p align="center">
OneBot GitHub Webhook 是一个用于接收 GitHub Webhook 推送事件并通过 OneBot 协议将通知转发到 QQ 群/好友的轻量级服务。它允许开发者和团队实时跟踪 GitHub 仓库活动,提高协作效率和项目透明度。
</p>

<p align="center">
<a href="https://www.codefactor.io/repository/github/AptS-1547/onebot-github-webhook/">
<img src="https://www.codefactor.io/repository/github/AptS-1547/onebot-github-webhook/badge" alt="CodeFactor" />
</a>

<a href="https://github.com/AptS-1547/onebot-github-webhook/activity">
<img src="https://img.shields.io/github/last-commit/AptS-1547/onebot-github-webhook/master" alt="Last Commit"/>
</a>

<a href="./LICENSE">
<img src="https://img.shields.io/github/license/AptS-1547/onebot-github-webhook" alt="GPL-3.0\"/>
</a>
</p>
<div align="center">
<img src="./resources/logo.png" alt="OneBot GitHub Webhook Logo">
</div>

<div align="center">

# OneBot GitHub Webhook

<p>OneBot GitHub Webhook 是一个用于接收 GitHub Webhook 推送事件并通过 OneBot 协议将通知转发到 QQ 群/好友的轻量级服务。它允许开发者和团队实时跟踪 GitHub 仓库活动,提高协作效率和项目透明度。</p>

<a href="https://www.codefactor.io/repository/github/AptS-1547/onebot-github-webhook/">
<img src="https://www.codefactor.io/repository/github/AptS-1547/onebot-github-webhook/badge" alt="CodeFactor" />
</a>

<a href="https://github.com/AptS-1547/onebot-github-webhook/activity">
<img src="https://img.shields.io/github/last-commit/AptS-1547/onebot-github-webhook/master" alt="Last Commit"/>
</a>

<a href="./LICENSE">
<img src="https://img.shields.io/github/license/AptS-1547/onebot-github-webhook" alt="Apache License 2.0" />
</a>

<img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="python">
</div>

## 功能特点

Expand Down
Binary file added docs/src/resources/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion hooks/github_webhook.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
# Copyright 2025 AptS-1547
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
GitHub Webhook 处理模块
本模块用于处理 GitHub Webhook 事件,包括验证签名、查找匹配的 webhook 配置和提取 push 事件数据。
作者:AptS:1547
版本:0.1.0-alpha
日期:2025-04-17
本程序遵循 GPL-3.0 许可证
本程序遵循 Apache License 2.0 许可证
"""

import hmac
Expand Down
16 changes: 15 additions & 1 deletion send_message.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Copyright 2025 AptS-1547
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
OneBot V11 客户端
本模块提供了一个 OneBot V11 客户端的实现,支持通过 WebSocket 和 HTTP 发送消息。
作者:AptS:1547
版本:0.1.0-alpha
日期:2025-04-17
本程序遵循 GPL-3.0 许可证
本程序遵循 Apache License 2.0 许可证
"""

import json
import logging
from typing import Union, List, Dict, Any
Expand Down
15 changes: 14 additions & 1 deletion settings.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
# Copyright 2025 AptS-1547
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""
Onebot Github Webhook 配置类
本文件用于定义 Onebot Github Webhook 的配置类和验证逻辑。
作者:AptS:1547
版本:0.1.0-alpha
日期:2025-04-17
本程序遵循 GPL-3.0 许可证
本程序遵循 Apache License 2.0 许可证
"""

import pathlib
Expand Down