1 Star 0 Fork 4

ChienSun / webhook

forked from Ealen / webhook 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Webhook

这是使用Java语言SpringBoot框架开发的 webhook v3全新版本,支持多种类型的Webhook扩展开发,事件处理机制

快速开始

1. 配置项目webhook

例如,最简单的配置了一个gitlab 类型的webhook , 事件处理类型为通知,以下配置了钉钉机器人


config:
  webhooks:
    - id: gitlab_project
      type: GITLAB
      notify:
        ding-talk:
          access-token: "93a937xxxxxxxxxxxxxxxxxxx872883c"
          sign-key: "SECcxxxxxxxxxxxxxxxxxxxxxxxx56bdd0"
启动项目

可在控制台中查看到已经配置好的webhook的地址信息


2023-06-13 11:10:11.282  INFO 5360 --- [           main] io.github.webhook.WebhookApplication     : Started WebhookApplication in 1.575 seconds (JVM running for 2.108)
2023-06-13 11:10:11.343  INFO 5360 --- [           main] i.g.w.core.WebhookCommandLineRunner      : Webhooks are successfully configured.
The following webhooks are available,Please fill in the following address in your system's webhook: 
The webhook[gitlab_project] type is:GITLAB,address: http://192.168.180.198:8787/webhook/actuator/gitlab_project
在gitlab后台中填入上面配置好的webhook地址,勾选需要触发的webhook事件。

配置好与之对应的钉钉群机器人

通知钉钉群机器人实现效果:

推送事件(Push Hook):

image.png

议题事件(Issue Hook):

image.png

流水线事件(Pipeline Hook):

image.png

合并请求事件(Merge Request Hook):

image.png

目前webhook类型仅实现了Gitlab类型的基本开发,其它类型正在开发中,支持自定义扩展类型

webhook类型 实现类 完成状态
GITLAB GitlabWebhookHandler ✔️
JIRA 暂无
CONFLUENCE 暂无

目前Gitlab默认支持的事件处理器实现,均支持实现自定义扩展实现

Gitlab事件类型 默认实现类 有默认实现
Push Hook PushHookNotifyEventHandler ✔️
Pipeline Hook PipelineHookNotifyEventHandler ️✔️
Merge Request Hook MergeRequestHookNotifyEventHandler ✔️
Tag Push Hook TagPushHookNotifyEventHandler ✔️
Issue Hook IssueHookNotifyEventHandler ✔️
Releases Hook ReleaseHookNotifyEventHandler ✔️
Note Hook NoteHookNotifyEventHandler ✔️
Job Hook JobHookNotifyEventHandler ✔️
Confidential Issue Hook 暂无
Confidential Note Hook 暂无
Wiki Page Hook 暂无
Deployment Hook 暂无
Feature Flag Hook 暂无

目前通知型事件处理类型支持 钉钉机器人,飞书机器人,企业微信机器人,支持自定义扩展通知类型

通知类型 实现类 完成状态
钉钉机器人 DingTalkNotifier ✔️
企业微信机器人 CorpWechatNotifier ✔️
飞书机器人 FeiShuNotifier ✔️
MIT License Copyright (c) 2023 Ealen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

这是使用SpringBoot框架开发的 webhook v3全新版本 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/ChienSun/webhook.git
git@gitee.com:ChienSun/webhook.git
ChienSun
webhook
webhook
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891