Java版 Gitlab Webhook + 机器人通知


在下才疏学浅,谨以此奉上Github地址为社区尽绵薄之力 : Gitlab Webhook+机器人通知

实现效果 :
推送事件(Push Hook):

image.png

议题事件(Issue Hook):

image.png

流水线事件(Pipeline Hook):

image.png

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

image.png

快速开始
1. 配置项目gitlab-webhook-robot的机器人

例如钉钉机器人:

webhook:
  ## webhook的消息发送方式为钉钉机器人
  way: ding
  ding:
    ## 请配置钉钉机器人的access-token
    access-token: 93axxxxahfjahklhjfxxxxx46f655ae0xxxxxxxxxx
    ## 请配置钉钉机器人sign-key
    sign-key: SECcd68c6bxxxxxxxx614xxxc926xxxxxxxxxxe811656bdd0

例如企业微信机器人:

webhook:
  ## webhook的消息发送方式为企业微信机器人
  way: wechat
  wechat:
    ## 请配置企业机器人的key
    key: 1xxxxxxx-xxxx-49ce-xxxx-4cd44xxxxxxx
2. 部署启动项目gitlab-webhook-robot
3. 配置Gitlab项目的webhook。包括接口地址,支持的事件

gitlab-webhook-robot的接口为http://ip:port/actuator/gitlab/webhook

image.png