GithubHelp home page GithubHelp logo

longerian / webhook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ealenxie/webhook

0.0 0.0 0.0 148 KB

这是使用SpringBoot框架开发的 webhook v3全新版本

License: MIT License

Java 100.00%

webhook's Introduction

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 ✔️
GITHUB GithubWebhookHandler ✔️
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 ✔️

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.