diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..7d1bc74
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,4 @@
+LarkAppId=cli_xxx
+LarkAppSecret=xxx
+VerificationToken=xxx
+EncryptKey=xxx
diff --git a/.gitignore b/.gitignore
index 66fd13c..c6160f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,10 @@
*.dll
*.so
*.dylib
+.env
+.idea
+.DS_Store
+common.yaml
# Test binary, built with `go test -c`
*.test
diff --git a/README.md b/README.md
index e5181e6..0d8a459 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,3 @@
# ospp-cr-bot
+
开源之夏 - 一种通用的 Code Review 机器人
diff --git a/cmd/main.go b/cmd/main.go
new file mode 100644
index 0000000..9628590
--- /dev/null
+++ b/cmd/main.go
@@ -0,0 +1,43 @@
+package main
+
+import (
+ "github.com/gin-gonic/gin"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/config"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/constants"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/eventListener"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/pushChannel/lark"
+ "github.com/lyleshaw/ospp-cr-bot/pkg/utils/log"
+ "github.com/sirupsen/logrus"
+)
+
+var (
+ isDebug bool
+)
+
+func init() {
+ initLog()
+ config.InitConfig()
+ config.MsgQueue = make(map[string]constants.MsgType)
+}
+
+func initLog() {
+ if isDebug {
+ logrus.SetLevel(logrus.DebugLevel)
+ log.Infof("Log level is: %s.", logrus.GetLevel())
+ } else {
+ logrus.SetLevel(logrus.InfoLevel)
+ }
+}
+
+func main() {
+ router := gin.Default()
+ router.POST("/github/webhook", eventListener.GitHubWebHook)
+ router.POST("/api/lark/callback", lark.Callback)
+ router.POST("/api/lark/cardCallback", lark.CardCallback)
+
+ err := router.Run(":3000")
+ if err != nil {
+ return
+ }
+ return
+}
diff --git a/common.yaml.example b/common.yaml.example
new file mode 100644
index 0000000..90fab7f
--- /dev/null
+++ b/common.yaml.example
@@ -0,0 +1,18 @@
+tasks:
+ - name: "Task 1"
+ repo: lyleshaw/repoTest
+ repoType: github
+ receiver: oc_xxxxxxxx
+ pushChannel: lark
+
+maps:
+ - name: "1"
+ github: lyleshaw
+ lark: ou_xxxxxx
+ role: member
+ boss: 0
+ - name: "2"
+ github: abc
+ lark: ou_xxxxxx
+ role: contributor
+ boss: lyleshaw
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..b5b1929
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,46 @@
+module github.com/lyleshaw/ospp-cr-bot
+
+go 1.17
+
+require (
+ github.com/faabiosr/cachego v0.15.0
+ github.com/fastwego/feishu v1.0.0-beta.4
+ github.com/gin-gonic/gin v1.7.7
+ github.com/sirupsen/logrus v1.8.1
+ github.com/spf13/viper v1.11.0
+ github.com/valyala/fasttemplate v1.2.1
+ gopkg.in/gookit/color.v1 v1.1.6
+ gopkg.in/yaml.v2 v2.4.0
+)
+
+require (
+ github.com/fsnotify/fsnotify v1.5.1 // indirect
+ github.com/gin-contrib/sse v0.1.0 // indirect
+ github.com/go-playground/locales v0.13.0 // indirect
+ github.com/go-playground/universal-translator v0.17.0 // indirect
+ github.com/go-playground/validator/v10 v10.4.1 // indirect
+ github.com/golang/protobuf v1.5.2 // indirect
+ github.com/hashicorp/hcl v1.0.0 // indirect
+ github.com/json-iterator/go v1.1.12 // indirect
+ github.com/leodido/go-urn v1.2.0 // indirect
+ github.com/magiconair/properties v1.8.6 // indirect
+ github.com/mattn/go-isatty v0.0.14 // indirect
+ github.com/mitchellh/mapstructure v1.4.3 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.2 // indirect
+ github.com/pelletier/go-toml v1.9.4 // indirect
+ github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect
+ github.com/spf13/afero v1.8.2 // indirect
+ github.com/spf13/cast v1.4.1 // indirect
+ github.com/spf13/jwalterweatherman v1.1.0 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ github.com/subosito/gotenv v1.2.0 // indirect
+ github.com/ugorji/go/codec v1.1.7 // indirect
+ github.com/valyala/bytebufferpool v1.0.0 // indirect
+ golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
+ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
+ golang.org/x/text v0.3.7 // indirect
+ google.golang.org/protobuf v1.28.0 // indirect
+ gopkg.in/ini.v1 v1.66.4 // indirect
+ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..417346d
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,874 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
+cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
+cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
+cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
+cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
+cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
+cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
+cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
+cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
+cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
+cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
+cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
+cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
+cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
+cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
+cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
+cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY=
+cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
+cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
+cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
+cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=
+cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=
+cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=
+cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
+cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
+cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
+cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
+cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=
+cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A=
+cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
+cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
+cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
+cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
+cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
+cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
+cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow=
+cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM=
+cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M=
+cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
+cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
+cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY=
+cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
+cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
+cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
+cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
+cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
+cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
+cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
+cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
+cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
+cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
+dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
+github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
+github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
+github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
+github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/bradfitz/gomemcache v0.0.0-20170208213004-1952afaa557d/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
+github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
+github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
+github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
+github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
+github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
+github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/faabiosr/cachego v0.15.0 h1:IqcDhvzMbL4a1c9Dek88DIWJYQ5HG//L0PKCReneOA4=
+github.com/faabiosr/cachego v0.15.0/go.mod h1:L2EomlU3/rUWjzFavY9Fwm8B4zZmX2X6u8kTMkETrwI=
+github.com/fastwego/feishu v1.0.0-beta.4 h1:P7yxeHqVB8mQZABWeQyl3pAN86qi3EWVCkg/0gEI5Yo=
+github.com/fastwego/feishu v1.0.0-beta.4/go.mod h1:F3MBx1nAdCwqKspNGY5dj6OEanQTU6t+FJ+Tmq/A3zw=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
+github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
+github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
+github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
+github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
+github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs=
+github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U=
+github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
+github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
+github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
+github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
+github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
+github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
+github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
+github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE=
+github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
+github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
+github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
+github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
+github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
+github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
+github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
+github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
+github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
+github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
+github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
+github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
+github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
+github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
+github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
+github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
+github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM=
+github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM=
+github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
+github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0=
+github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
+github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
+github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
+github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
+github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
+github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
+github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
+github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
+github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
+github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
+github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
+github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
+github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
+github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
+github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
+github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
+github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
+github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
+github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
+github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
+github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=
+github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
+github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
+github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
+github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
+github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
+github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
+github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
+github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
+github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
+github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
+github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
+github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
+github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
+github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
+github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
+github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
+github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
+github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
+github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
+github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
+github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
+github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
+github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
+github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
+github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
+github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
+github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
+github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
+github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0=
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
+github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
+github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
+github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
+github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
+github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
+github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0=
+github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
+github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
+github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
+github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA=
+github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
+github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
+github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
+github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
+github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
+github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
+github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
+github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
+github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44=
+github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
+github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
+github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
+github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
+github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
+github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
+github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
+github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
+github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
+github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
+github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
+github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
+go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
+go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
+go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI=
+go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
+go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
+go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
+go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
+go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
+go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
+golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
+golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
+golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
+golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
+golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
+golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
+golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
+golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
+golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
+golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
+golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
+golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
+golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
+golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
+golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
+golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
+golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
+golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
+golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
+golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
+golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
+golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
+golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
+golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
+golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
+golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
+golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U=
+golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
+google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
+google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
+google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
+google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
+google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
+google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
+google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
+google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
+google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
+google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
+google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
+google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
+google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
+google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=
+google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
+google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
+google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
+google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
+google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
+google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
+google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU=
+google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
+google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo=
+google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g=
+google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA=
+google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8=
+google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
+google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
+google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
+google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
+google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
+google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
+google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
+google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
+google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
+google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
+google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
+google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
+google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
+google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
+google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
+google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
+google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
+google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
+google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
+google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
+google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
+google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
+google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
+google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
+google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
+google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
+google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
+google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
+google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
+google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a/go.mod h1:KF9sEfUPAXdG8Oev9e99iLGnl2uJMjc5B+4y3O7x610=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/gookit/color.v1 v1.1.6 h1:5fB10p6AUFjhd2ayq9JgmJWr9WlTrguFdw3qlYtKNHk=
+gopkg.in/gookit/color.v1 v1.1.6/go.mod h1:IcEkFGaveVShJ+j8ew+jwe9epHyGpJ9IrptHmW3laVY=
+gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4=
+gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
+gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
+gopkg.in/redis.v4 v4.2.4/go.mod h1:8KREHdypkCEojGKQcjMqAODMICIVwZAONWq8RowTITA=
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
+honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
+rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
+rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
+rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
new file mode 100644
index 0000000..517b09c
--- /dev/null
+++ b/internal/pkg/config/config.go
@@ -0,0 +1,72 @@
+package config
+
+import (
+ "fmt"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/constants"
+ "gopkg.in/yaml.v2"
+ "io/ioutil"
+)
+
+var (
+ Cfg *Config
+ LarkMaps map[string]Maps
+ MsgQueue map[string]constants.MsgType
+)
+
+type Config struct {
+ Tasks []Tasks `yaml:"tasks"`
+ Maps []Maps `yaml:"maps"`
+}
+type Tasks struct {
+ Name string `yaml:"name"`
+ Repo string `yaml:"repo"`
+ Receiver string `yaml:"receiver"`
+ ReceiverType string `yaml:"receiverType"`
+ PushChannel string `yaml:"pushChannel"`
+}
+
+type Maps struct {
+ Github string `yaml:"github"`
+ Lark string `yaml:"lark"`
+ Role string `yaml:"role"`
+ Boss string `yaml:"boss"`
+}
+
+func InitConfig() {
+ config, err := ioutil.ReadFile("./common.yaml")
+ if err != nil {
+ fmt.Print(err)
+ }
+
+ err = yaml.Unmarshal(config, &Cfg)
+ if err != nil {
+ fmt.Println("error")
+ }
+
+ if err != nil {
+ fmt.Println("error")
+ }
+
+ LarkMaps = make(map[string]Maps)
+ for _, i := range Cfg.Maps {
+ LarkMaps[i.Github] = i
+ }
+}
+
+func QueryReceiveIDByRepo(repo string) (string, error) {
+ for _, task := range Cfg.Tasks {
+ if task.Repo == repo {
+ return task.Receiver, nil
+ }
+ }
+ return "", fmt.Errorf("repo not found")
+}
+
+func QueryGithubIdByLarkId(larkId string) (string, error) {
+ for _, i := range Cfg.Maps {
+ if i.Lark == larkId {
+ return i.Github, nil
+ }
+ }
+ return "", fmt.Errorf("larkId not found")
+}
diff --git a/internal/pkg/constants/constants.go b/internal/pkg/constants/constants.go
new file mode 100644
index 0000000..3e82627
--- /dev/null
+++ b/internal/pkg/constants/constants.go
@@ -0,0 +1,19 @@
+package constants
+
+import "time"
+
+type MsgType int
+
+const (
+ READ MsgType = 0
+ Unread1 MsgType = 1
+ Unread2 MsgType = 2
+ Unread3 MsgType = 3
+)
+
+const (
+ TimeUnread1 = 30 * time.Minute // PR/Issue 消息第一次发送消息后若未读,经过 TimeUnread1 后重发
+ TimeUnread2 = 30 * time.Minute // PR/Issue 消息第二次发送消息后若未读,经过 TimeUnread2 后发送给上级
+ TimeUnread3 = 11 * time.Hour // PR/Issue 消息第三次发送消息后若未读,经过 TimeUnread3 后抄送群聊
+ CommentUnread = 1 * time.Hour // Comment 消息第一次发送后若未读,经过 CommentUnread 后抄送群聊
+)
diff --git a/internal/pkg/eventListener/eventListener.go b/internal/pkg/eventListener/eventListener.go
new file mode 100644
index 0000000..e65a400
--- /dev/null
+++ b/internal/pkg/eventListener/eventListener.go
@@ -0,0 +1,430 @@
+package eventListener
+
+import (
+ "encoding/json"
+ "github.com/gin-gonic/gin"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/config"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/constants"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/pushChannel/lark/messageTemplate"
+ "github.com/lyleshaw/ospp-cr-bot/pkg/utils/log"
+ "github.com/valyala/fasttemplate"
+ "io/ioutil"
+ "net/url"
+ "regexp"
+ "strconv"
+ "time"
+
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/pushChannel/lark"
+)
+
+// Event defines a GitHub hook event type
+type Event string
+
+// GitHub hook types
+const (
+ IssueCommentEvent Event = "issue_comment"
+ IssuesEvent Event = "issues"
+ PullRequestEvent Event = "pull_request"
+ PullRequestReviewEvent Event = "pull_request_review"
+ PullRequestReviewCommentEvent Event = "pull_request_review_comment"
+)
+
+func getAtPeopleFromComment(comment string) (res []string) {
+ compileRegex := regexp.MustCompile("@(\\S*?) ")
+ data := compileRegex.FindAllStringSubmatch(comment, -1)
+ for _, v := range data {
+ res = append(res, v[1])
+ }
+ return
+}
+
+// GitHubWebHook .
+// @router /github/webhook [POST]
+func GitHubWebHook(c *gin.Context) {
+ event := c.GetHeader("X-GitHub-Event")
+ if event == "" {
+ return
+ }
+
+ body, _ := ioutil.ReadAll(c.Request.Body)
+ bodyStr := string(body)
+ bodyStr = bodyStr[8:]
+ bodyStr, _ = url.QueryUnescape(bodyStr)
+
+ gitHubEvent := Event(event)
+
+ log.Infof("Event Type: %s\n", gitHubEvent)
+ switch gitHubEvent {
+ case IssueCommentEvent:
+ var req IssueCommentPayload
+ _ = json.Unmarshal([]byte(bodyStr), &req)
+
+ t := fasttemplate.New(messageTemplate.IssueCommentMsg, "{{", "}}")
+
+ // 正则拿到提及人
+ var requestedReviewers string
+ atPeople := getAtPeopleFromComment(req.Comment.Body)
+ for _, v := range atPeople {
+ if _, ok := config.LarkMaps[v]; ok {
+ requestedReviewers += ""
+ }
+ }
+
+ receiveID, err := config.QueryReceiveIDByRepo(req.Repository.FullName)
+ if err != nil {
+ return
+ }
+
+ var issueCommentMsg string
+ // 如果没有 Assignees 直接发到群
+ if len(atPeople) == 0 {
+ issueCommentMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.IssueCommentTitle2,
+ "Time": req.Issue.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "IssueTitle": req.Issue.Title,
+ "Login": req.Issue.User.Login,
+ "IssueNumber": strconv.FormatInt(req.Issue.Number, 10),
+ "IssueContent": req.Comment.Body,
+ "RequestedReviewers": "无",
+ "IssueURL": req.Issue.HTMLURL,
+ })
+
+ _, err = lark.SendGroupMessage(receiveID, issueCommentMsg)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ return
+ }
+
+ issueCommentMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.IssueCommentTitle1,
+ "Time": req.Issue.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "IssueTitle": req.Issue.Title,
+ "Login": req.Issue.User.Login,
+ "IssueNumber": strconv.FormatInt(req.Issue.Number, 10),
+ "IssueContent": req.Comment.Body,
+ "RequestedReviewers": requestedReviewers,
+ "IssueURL": req.Issue.HTMLURL,
+ })
+
+ number := strconv.FormatInt(req.Issue.Number, 10)
+
+ // 简化版的 SendMessages
+ for _, receiver := range atPeople {
+ if _, ok := config.MsgQueue[receiver+number+string(gitHubEvent)]; !ok {
+ config.MsgQueue[receiver+number+string(gitHubEvent)] = constants.Unread1
+ msg, err := lark.SendMessage(config.LarkMaps[receiver].Lark, issueCommentMsg)
+ if err != nil {
+ log.Errorf("send message failed, msg=%v", msg)
+ log.Errorf("send message failed, err=%v", err)
+ }
+ log.Infof("msgQ=%v", config.MsgQueue)
+ } else {
+ if config.MsgQueue[receiver+number+string(gitHubEvent)] == constants.READ {
+ // 已读,从队列中删除
+ delete(config.MsgQueue, receiver+number+string(gitHubEvent))
+ log.Infof("msgQ=%v", config.MsgQueue)
+ }
+ }
+ }
+
+ // 定时未读则转发群聊
+ time.AfterFunc(constants.CommentUnread, func() {
+ issueCommentMsg = lark.MsgTemplateUpgrade(issueCommentMsg, "有人")
+ for _, receiver := range atPeople {
+ if _, ok := config.MsgQueue[receiver+number+string(gitHubEvent)]; ok {
+ if config.MsgQueue[receiver+number+string(gitHubEvent)] == constants.Unread1 {
+ _, err = lark.SendGroupMessage(receiveID, issueCommentMsg)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ delete(config.MsgQueue, receiver+number+string(gitHubEvent))
+ log.Infof("msgQ=%v", config.MsgQueue)
+ }
+ }
+ }
+ })
+ case IssuesEvent:
+ var req IssuesPayload
+ _ = json.Unmarshal([]byte(bodyStr), &req)
+
+ t := fasttemplate.New(messageTemplate.IssueMsg, "{{", "}}")
+
+ receiveID, err := config.QueryReceiveIDByRepo(req.Repository.FullName)
+ if err != nil {
+ return
+ }
+
+ var assigneesToAt string
+ assignees := make([]string, len(req.Issue.Assignees))
+ for i, v := range req.Issue.Assignees {
+ if _, ok := config.LarkMaps[v.Login]; ok {
+ assigneesToAt += ""
+ assignees[i] = v.Login
+ }
+ }
+
+ var issueMsg string
+ // 如果没有 Assignees 直接发到群
+ if len(assignees) == 0 {
+ issueMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.IssueTitle1,
+ "Time": req.Issue.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "IssueTitle": req.Issue.Title,
+ "Login": req.Issue.User.Login,
+ "IssueNumber": strconv.FormatInt(req.Issue.Number, 10),
+ "IssueContent": req.Issue.Body,
+ "RequestedReviewers": "无",
+ "IssueURL": req.Issue.HTMLURL,
+ })
+
+ _, err = lark.SendGroupMessage(receiveID, issueMsg)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ return
+ }
+
+ // 如果有,则先发送到人,等待超时后再发送到群
+ issueMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.IssueTitle1,
+ "Time": req.Issue.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "IssueTitle": req.Issue.Title,
+ "Login": req.Issue.User.Login,
+ "IssueNumber": strconv.FormatInt(req.Issue.Number, 10),
+ "IssueContent": req.Issue.Body,
+ "RequestedReviewers": assigneesToAt,
+ "IssueURL": req.Issue.HTMLURL,
+ })
+
+ lark.SendMessages(receiveID, assignees, issueMsg, strconv.FormatInt(req.Issue.Number, 10), string(gitHubEvent))
+ case PullRequestEvent:
+ var req PullRequestPayload
+ _ = json.Unmarshal([]byte(bodyStr), &req)
+
+ t := fasttemplate.New(messageTemplate.PrMsg, "{{", "}}")
+
+ receiveID, err := config.QueryReceiveIDByRepo(req.Repository.FullName)
+ if err != nil {
+ return
+ }
+
+ var assigneesToAt string
+ assignees := make([]string, len(req.PullRequest.Assignees))
+ for i, v := range req.PullRequest.Assignees {
+ if _, ok := config.LarkMaps[v.Login]; ok {
+ assigneesToAt += ""
+ assignees[i] = v.Login
+ }
+ }
+
+ var prMsg string
+ // 如果没有 Assignees 直接发到群
+ if len(assignees) == 0 {
+ prMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.PrTitle2,
+ "Time": req.PullRequest.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "PRTitle": req.PullRequest.Title,
+ "Login": req.PullRequest.User.Login,
+ "PRNumber": strconv.FormatInt(req.PullRequest.Number, 10),
+ "PRContent": req.PullRequest.Body,
+ "RequestedReviewers": "无",
+ "PRURL": req.PullRequest.HTMLURL,
+ })
+
+ _, err = lark.SendGroupMessage(receiveID, prMsg)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ return
+ }
+
+ // 如果有,则先发送到人,等待超时后再发送到群
+ prMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.PrTitle1,
+ "Time": req.PullRequest.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "PRTitle": req.PullRequest.Title,
+ "Login": req.PullRequest.User.Login,
+ "PRNumber": strconv.FormatInt(req.PullRequest.Number, 10),
+ "PRContent": req.PullRequest.Body,
+ "RequestedReviewers": assigneesToAt,
+ "PRURL": req.PullRequest.HTMLURL,
+ })
+ lark.SendMessages(receiveID, assignees, prMsg, strconv.FormatInt(req.PullRequest.Number, 10), string(gitHubEvent))
+ case PullRequestReviewEvent:
+ var req PullRequestReviewPayload
+ _ = json.Unmarshal([]byte(bodyStr), &req)
+
+ t := fasttemplate.New(messageTemplate.PrReviewMsg, "{{", "}}")
+
+ receiveID, err := config.QueryReceiveIDByRepo(req.Repository.FullName)
+ if err != nil {
+ return
+ }
+
+ // 正则拿到提及人
+ var requestedReviewers string
+ atPeople := getAtPeopleFromComment(req.Review.Body)
+ for _, v := range atPeople {
+ if _, ok := config.LarkMaps[v]; ok {
+ requestedReviewers += ""
+ }
+ }
+
+ var prReviewMsg string
+ // 如果没有 Assignees 直接发到群
+ if len(atPeople) == 0 {
+ prReviewMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.PrReviewTitle1,
+ "Time": req.PullRequest.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "PRTitle": req.PullRequest.Title,
+ "Login": req.PullRequest.User.Login,
+ "PRNumber": strconv.FormatInt(int64(req.PullRequest.Number), 10),
+ "PRContent": req.PullRequest.Body,
+ "RequestedReviewers": "无",
+ "PRURL": req.PullRequest.HTMLURL,
+ })
+
+ _, err = lark.SendGroupMessage(receiveID, prReviewMsg)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ return
+ }
+
+ prReviewMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.PrReviewTitle1,
+ "Time": req.PullRequest.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "PRTitle": req.PullRequest.Title,
+ "Login": req.PullRequest.User.Login,
+ "PRNumber": strconv.FormatInt(int64(req.PullRequest.Number), 10),
+ "PRContent": req.Review.Body,
+ "RequestedReviewers": requestedReviewers,
+ "PRURL": req.PullRequest.HTMLURL,
+ })
+
+ number := strconv.FormatInt(int64(req.PullRequest.Number), 10)
+
+ // 简化版的 SendMessages
+ for _, receiver := range atPeople {
+ if _, ok := config.MsgQueue[receiver+number+string(gitHubEvent)]; !ok {
+ config.MsgQueue[receiver+number+string(gitHubEvent)] = constants.Unread1
+ msg, err := lark.SendMessage(config.LarkMaps[receiver].Lark, prReviewMsg)
+ if err != nil {
+ log.Errorf("send message failed, msg=%v", msg)
+ log.Errorf("send message failed, err=%v", err)
+ }
+ log.Infof("msgQ=%v", config.MsgQueue)
+ } else {
+ if config.MsgQueue[receiver+number+string(gitHubEvent)] == constants.READ {
+ // 已读,从队列中删除
+ delete(config.MsgQueue, receiver+number+string(gitHubEvent))
+ log.Infof("msgQ=%v", config.MsgQueue)
+ }
+ }
+ }
+
+ // 定时未读则转发群聊
+ time.AfterFunc(constants.CommentUnread, func() {
+ prReviewMsg = lark.MsgTemplateUpgrade(prReviewMsg, "有人")
+ for _, receiver := range atPeople {
+ if _, ok := config.MsgQueue[receiver+number+string(gitHubEvent)]; ok {
+ if config.MsgQueue[receiver+number+string(gitHubEvent)] == constants.Unread1 {
+ _, err = lark.SendGroupMessage(receiveID, prReviewMsg)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ }
+ }
+ }
+ })
+ case PullRequestReviewCommentEvent:
+ var req PullRequestReviewCommentPayload
+ _ = json.Unmarshal([]byte(bodyStr), &req)
+
+ t := fasttemplate.New(messageTemplate.PrCommentMsg, "{{", "}}")
+
+ receiveID, err := config.QueryReceiveIDByRepo(req.Repository.FullName)
+ if err != nil {
+ return
+ }
+
+ // 正则拿到提及人
+ var requestedReviewers string
+ atPeople := getAtPeopleFromComment(req.Comment.Body)
+ for _, v := range atPeople {
+ if _, ok := config.LarkMaps[v]; ok {
+ requestedReviewers += ""
+ }
+ }
+
+ var prCommentMsg string
+ // 如果没有 Assignees 直接发到群
+ if len(atPeople) == 0 {
+ prCommentMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.PrCommentTitle1,
+ "Time": req.PullRequest.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "PRTitle": req.PullRequest.Title,
+ "Login": req.PullRequest.User.Login,
+ "PRNumber": strconv.FormatInt(req.PullRequest.Number, 10),
+ "PRContent": req.PullRequest.Body,
+ "RequestedReviewers": "无",
+ "PRURL": req.PullRequest.HTMLURL,
+ })
+
+ _, err = lark.SendGroupMessage(receiveID, prCommentMsg)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ return
+ }
+
+ prCommentMsg = t.ExecuteString(map[string]interface{}{
+ "Title": messageTemplate.PrCommentTitle1,
+ "Time": req.PullRequest.CreatedAt.Format("2006年01月02日 15:04:05"),
+ "PRTitle": req.PullRequest.Title,
+ "Login": req.PullRequest.User.Login,
+ "PRNumber": strconv.FormatInt(req.PullRequest.Number, 10),
+ "PRContent": req.Comment.Body,
+ "RequestedReviewers": requestedReviewers,
+ "PRURL": req.PullRequest.HTMLURL,
+ })
+
+ number := strconv.FormatInt(req.PullRequest.Number, 10)
+
+ // 简化版的 SendMessages
+ for _, receiver := range atPeople {
+ if _, ok := config.MsgQueue[receiver+number+string(gitHubEvent)]; !ok {
+ config.MsgQueue[receiver+number+string(gitHubEvent)] = constants.Unread1
+ msg, err := lark.SendMessage(config.LarkMaps[receiver].Lark, prCommentMsg)
+ if err != nil {
+ log.Errorf("send message failed, msg=%v", msg)
+ log.Errorf("send message failed, err=%v", err)
+ }
+ log.Infof("msgQ=%v", config.MsgQueue)
+ } else {
+ if config.MsgQueue[receiver+number+string(gitHubEvent)] == constants.READ {
+ // 已读,从队列中删除
+ delete(config.MsgQueue, receiver+number+string(gitHubEvent))
+ log.Infof("msgQ=%v", config.MsgQueue)
+ }
+ }
+ }
+
+ // 定时未读则转发群聊
+ time.AfterFunc(constants.CommentUnread, func() {
+ prCommentMsg = lark.MsgTemplateUpgrade(prCommentMsg, "有人")
+ for _, receiver := range atPeople {
+ if _, ok := config.MsgQueue[receiver+number+string(gitHubEvent)]; ok {
+ if config.MsgQueue[receiver+number+string(gitHubEvent)] == constants.Unread1 {
+ _, err = lark.SendGroupMessage(receiveID, prCommentMsg)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ }
+ }
+ }
+ })
+ }
+ c.JSON(200, nil)
+}
diff --git a/internal/pkg/eventListener/payload.go b/internal/pkg/eventListener/payload.go
new file mode 100644
index 0000000..f410594
--- /dev/null
+++ b/internal/pkg/eventListener/payload.go
@@ -0,0 +1,6975 @@
+package eventListener
+
+import "time"
+
+type PullRequestReviewPayload struct {
+ Action string `json:"action"`
+ Review struct {
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ User struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Body string `json:"body"`
+ CommitID string `json:"commit_id"`
+ SubmittedAt time.Time `json:"submitted_at"`
+ State string `json:"state"`
+ HTMLURL string `json:"html_url"`
+ PullRequestURL string `json:"pull_request_url"`
+ AuthorAssociation string `json:"author_association"`
+ Links struct {
+ HTML struct {
+ Href string `json:"href"`
+ } `json:"html"`
+ PullRequest struct {
+ Href string `json:"href"`
+ } `json:"pull_request"`
+ } `json:"_links"`
+ } `json:"review"`
+ PullRequest struct {
+ URL string `json:"url"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ HTMLURL string `json:"html_url"`
+ DiffURL string `json:"diff_url"`
+ PatchURL string `json:"patch_url"`
+ IssueURL string `json:"issue_url"`
+ Number int `json:"number"`
+ State string `json:"state"`
+ Locked bool `json:"locked"`
+ Title string `json:"title"`
+ User struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Body interface{} `json:"body"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ ClosedAt interface{} `json:"closed_at"`
+ MergedAt interface{} `json:"merged_at"`
+ MergeCommitSha string `json:"merge_commit_sha"`
+ Assignee *Assignee `json:"assignee"`
+ Assignees []*Assignee `json:"assignees"`
+ RequestedReviewers []struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"requested_reviewers,omitempty"`
+ RequestedTeams []interface{} `json:"requested_teams"`
+ Labels []interface{} `json:"labels"`
+ Milestone interface{} `json:"milestone"`
+ Draft bool `json:"draft"`
+ CommitsURL string `json:"commits_url"`
+ ReviewCommentsURL string `json:"review_comments_url"`
+ ReviewCommentURL string `json:"review_comment_url"`
+ CommentsURL string `json:"comments_url"`
+ StatusesURL string `json:"statuses_url"`
+ Head struct {
+ Label string `json:"label"`
+ Ref string `json:"ref"`
+ Sha string `json:"sha"`
+ User struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Repo struct {
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ HTMLURL string `json:"html_url"`
+ Description interface{} `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage interface{} `json:"homepage"`
+ Size int `json:"size"`
+ StargazersCount int `json:"stargazers_count"`
+ WatchersCount int `json:"watchers_count"`
+ Language string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasProjects bool `json:"has_projects"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int `json:"forks_count"`
+ MirrorURL interface{} `json:"mirror_url"`
+ Archived bool `json:"archived"`
+ Disabled bool `json:"disabled"`
+ OpenIssuesCount int `json:"open_issues_count"`
+ License interface{} `json:"license"`
+ AllowForking bool `json:"allow_forking"`
+ IsTemplate bool `json:"is_template"`
+ Topics []interface{} `json:"topics"`
+ Visibility string `json:"visibility"`
+ Forks int `json:"forks"`
+ OpenIssues int `json:"open_issues"`
+ Watchers int `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ AllowSquashMerge bool `json:"allow_squash_merge"`
+ AllowMergeCommit bool `json:"allow_merge_commit"`
+ AllowRebaseMerge bool `json:"allow_rebase_merge"`
+ AllowAutoMerge bool `json:"allow_auto_merge"`
+ DeleteBranchOnMerge bool `json:"delete_branch_on_merge"`
+ AllowUpdateBranch bool `json:"allow_update_branch"`
+ } `json:"repo"`
+ } `json:"head"`
+ Base struct {
+ Label string `json:"label"`
+ Ref string `json:"ref"`
+ Sha string `json:"sha"`
+ User struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Repo struct {
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ HTMLURL string `json:"html_url"`
+ Description interface{} `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage interface{} `json:"homepage"`
+ Size int `json:"size"`
+ StargazersCount int `json:"stargazers_count"`
+ WatchersCount int `json:"watchers_count"`
+ Language string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasProjects bool `json:"has_projects"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int `json:"forks_count"`
+ MirrorURL interface{} `json:"mirror_url"`
+ Archived bool `json:"archived"`
+ Disabled bool `json:"disabled"`
+ OpenIssuesCount int `json:"open_issues_count"`
+ License interface{} `json:"license"`
+ AllowForking bool `json:"allow_forking"`
+ IsTemplate bool `json:"is_template"`
+ Topics []interface{} `json:"topics"`
+ Visibility string `json:"visibility"`
+ Forks int `json:"forks"`
+ OpenIssues int `json:"open_issues"`
+ Watchers int `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ AllowSquashMerge bool `json:"allow_squash_merge"`
+ AllowMergeCommit bool `json:"allow_merge_commit"`
+ AllowRebaseMerge bool `json:"allow_rebase_merge"`
+ AllowAutoMerge bool `json:"allow_auto_merge"`
+ DeleteBranchOnMerge bool `json:"delete_branch_on_merge"`
+ AllowUpdateBranch bool `json:"allow_update_branch"`
+ } `json:"repo"`
+ } `json:"base"`
+ Links struct {
+ Self struct {
+ Href string `json:"href"`
+ } `json:"self"`
+ HTML struct {
+ Href string `json:"href"`
+ } `json:"html"`
+ Issue struct {
+ Href string `json:"href"`
+ } `json:"issue"`
+ Comments struct {
+ Href string `json:"href"`
+ } `json:"comments"`
+ ReviewComments struct {
+ Href string `json:"href"`
+ } `json:"review_comments"`
+ ReviewComment struct {
+ Href string `json:"href"`
+ } `json:"review_comment"`
+ Commits struct {
+ Href string `json:"href"`
+ } `json:"commits"`
+ Statuses struct {
+ Href string `json:"href"`
+ } `json:"statuses"`
+ } `json:"_links"`
+ AuthorAssociation string `json:"author_association"`
+ AutoMerge interface{} `json:"auto_merge"`
+ ActiveLockReason interface{} `json:"active_lock_reason"`
+ } `json:"pull_request"`
+ Repository struct {
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ HTMLURL string `json:"html_url"`
+ Description interface{} `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage interface{} `json:"homepage"`
+ Size int `json:"size"`
+ StargazersCount int `json:"stargazers_count"`
+ WatchersCount int `json:"watchers_count"`
+ Language string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasProjects bool `json:"has_projects"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int `json:"forks_count"`
+ MirrorURL interface{} `json:"mirror_url"`
+ Archived bool `json:"archived"`
+ Disabled bool `json:"disabled"`
+ OpenIssuesCount int `json:"open_issues_count"`
+ License interface{} `json:"license"`
+ AllowForking bool `json:"allow_forking"`
+ IsTemplate bool `json:"is_template"`
+ Topics []interface{} `json:"topics"`
+ Visibility string `json:"visibility"`
+ Forks int `json:"forks"`
+ OpenIssues int `json:"open_issues"`
+ Watchers int `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// CheckRunPayload contains the information for GitHub's check_run hook event
+type CheckRunPayload struct {
+ Action string `json:"action"`
+ CheckRun struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ HeadSHA string `json:"head_sha"`
+ Status string `json:"status"`
+ Conclusion string `json:"conclusion"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ StarterAt time.Time `json:"started_at"`
+ CompletedAt time.Time `json:"completed_at"`
+ Output struct {
+ Title string `json:"title"`
+ Summary string `json:"summary"`
+ Text string `json:"text"`
+ AnnotationsCount int64 `json:"annotations_count"`
+ AnnotationsURL string `json:"annotations_url"`
+ }
+ CheckSuite struct {
+ ID int64 `json:"id"`
+ HeadBranch string `json:"head_branch"`
+ HeadSHA string `json:"head_sha"`
+ Status string `json:"status"`
+ Conclusion string `json:"conclusion"`
+ URL string `json:"url"`
+ Before string `json:"before"`
+ After string `json:"after"`
+ PullRequests []PullRequestPayload `json:"pull_requests"`
+ App struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ ExternalURL string `json:"external_url"`
+ HTMLURL string `json:"html_url"`
+ CreatedAt string `json:"created_at"`
+ UpdatedAt string `json:"updated_at"`
+ } `json:"app"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ } `json:"check_suite"`
+ App struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ ExternalURL string `json:"external_url"`
+ HTMLURL string `json:"html_url"`
+ CreatedAt string `json:"created_at"`
+ UpdatedAt string `json:"updated_at"`
+ } `json:"app"`
+ PullRequests []PullRequestPayload `json:"pull_requests"`
+ } `json:"check_run"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Installation struct {
+ ID int64 `json:"id"`
+ } `json:"installation,omitempty"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// CheckSuitePayload contains the information for GitHub's check_suite hook event
+type CheckSuitePayload struct {
+ Action string `json:"action"`
+ CheckSuite struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ HeadBranch string `json:"head_branch"`
+ HeadSHA string `json:"head_sha"`
+ Status string `json:"status"`
+ Conclusion string `json:"conclusion"`
+ URL string `json:"url"`
+ Before string `json:"before"`
+ After string `json:"after"`
+ PullRequests []PullRequestPayload `json:"pull_requests"`
+ App struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ ExternalURL string `json:"external_url"`
+ HTMLURL string `json:"html_url"`
+ CreatedAt string `json:"created_at"`
+ UpdatedAt string `json:"updated_at"`
+ } `json:"app"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ LatestCheckRunsCount int64 `json:"latest_check_runs_count"`
+ CheckRunsURL string `json:"check_runs_url"`
+ HeadCommit struct {
+ ID string `json:"id"`
+ TreeID string `json:"tree_id"`
+ Message string `json:"message"`
+ Timestamp time.Time `json:"timestamp"`
+ Author struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ } `json:"author"`
+ Commiter struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ } `json:"commiter"`
+ } `json:"head_commit"`
+ } `json:"check_suite"`
+ Repository struct {
+ ID int64 `json:"id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Installation struct {
+ ID int64 `json:"id"`
+ } `json:"installation,omitempty"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// CommitCommentPayload contains the information for GitHub's commit_comment hook event
+type CommitCommentPayload struct {
+ Action string `json:"action"`
+ Comment struct {
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Position *int64 `json:"position"`
+ Line *int64 `json:"line"`
+ Path *string `json:"path"`
+ CommitID string `json:"commit_id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ Body string `json:"body"`
+ AuthorAssociation string `json:"author_association"`
+ } `json:"comment"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// CreatePayload contains the information for GitHub's create hook event
+type CreatePayload struct {
+ Ref string `json:"ref"`
+ RefType string `json:"ref_type"`
+ MasterBranch string `json:"master_branch"`
+ Description string `json:"description"`
+ PusherType string `json:"pusher_type"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// DeletePayload contains the information for GitHub's delete hook event
+type DeletePayload struct {
+ Ref string `json:"ref"`
+ RefType string `json:"ref_type"`
+ PusherType string `json:"pusher_type"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// DeployKeyPayload contains the information for GitHub's deploy_key hook
+type DeployKeyPayload struct {
+ Action string `json:"action"`
+ Key struct {
+ ID int `json:"id"`
+ Key string `json:"key"`
+ URL string `json:"url"`
+ Title string `json:"title"`
+ Verified bool `json:"verified"`
+ CreatedAt time.Time `json:"created_at"`
+ ReadOnly bool `json:"read_only"`
+ } `json:"key"`
+ Repository struct {
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description interface{} `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage interface{} `json:"homepage"`
+ Size int `json:"size"`
+ StargazersCount int `json:"stargazers_count"`
+ WatchersCount int `json:"watchers_count"`
+ Language interface{} `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasProjects bool `json:"has_projects"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int `json:"forks_count"`
+ MirrorURL interface{} `json:"mirror_url"`
+ Archived bool `json:"archived"`
+ OpenIssuesCount int `json:"open_issues_count"`
+ License interface{} `json:"license"`
+ Forks int `json:"forks"`
+ OpenIssues int `json:"open_issues"`
+ Watchers int `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// DeploymentPayload contains the information for GitHub's deployment hook
+type DeploymentPayload struct {
+ Deployment struct {
+ URL string `json:"url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Sha string `json:"sha"`
+ Ref string `json:"ref"`
+ Task string `json:"task"`
+ Payload struct{} `json:"payload"`
+ Environment string `json:"environment"`
+ Description *string `json:"description"`
+ Creator struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"creator"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ StatusesURL string `json:"statuses_url"`
+ RepositoryURL string `json:"repository_url"`
+ } `json:"deployment"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// DeploymentStatusPayload contains the information for GitHub's deployment_status hook event
+type DeploymentStatusPayload struct {
+ DeploymentStatus struct {
+ URL string `json:"url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ State string `json:"state"`
+ Creator struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"creator"`
+ Description *string `json:"description"`
+ TargetURL *string `json:"target_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeploymentURL string `json:"deployment_url"`
+ RepositoryURL string `json:"repository_url"`
+ } `json:"deployment_status"`
+ Deployment struct {
+ URL string `json:"url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Sha string `json:"sha"`
+ Ref string `json:"ref"`
+ Task string `json:"task"`
+ Payload struct{} `json:"payload"`
+ Environment string `json:"environment"`
+ Description *string `json:"description"`
+ Creator struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"creator"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ StatusesURL string `json:"statuses_url"`
+ RepositoryURL string `json:"repository_url"`
+ } `json:"deployment"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// ForkPayload contains the information for GitHub's fork hook event
+type ForkPayload struct {
+ Forkee struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ Public bool `json:"public"`
+ } `json:"forkee"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// GollumPayload contains the information for GitHub's gollum hook event
+type GollumPayload struct {
+ Pages []struct {
+ PageName string `json:"page_name"`
+ Title string `json:"title"`
+ Summary *string `json:"summary"`
+ Action string `json:"action"`
+ Sha string `json:"sha"`
+ HTMLURL string `json:"html_url"`
+ } `json:"pages"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// InstallationPayload contains the information for GitHub's installation and integration_installation hook events
+type InstallationPayload struct {
+ Action string `json:"action"`
+ Installation struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Account struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"account"`
+ RepositorySelection string `json:"repository_selection"`
+ AccessTokensURL string `json:"access_tokens_url"`
+ RepositoriesURL string `json:"repositories_url"`
+ HTMLURL string `json:"html_url"`
+ AppID int `json:"app_id"`
+ TargetID int `json:"target_id"`
+ TargetType string `json:"target_type"`
+ Permissions struct {
+ Issues string `json:"issues"`
+ Metadata string `json:"metadata"`
+ PullRequests string `json:"pull_requests"`
+ RepositoryProjects string `json:"repository_projects"`
+ } `json:"permissions"`
+ Events []string `json:"events"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ SingleFileName *string `json:"single_file_name"`
+ } `json:"installation"`
+ Repositories []struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ } `json:"repositories"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// InstallationRepositoriesPayload contains the information for GitHub's installation_repositories hook events
+type InstallationRepositoriesPayload struct {
+ Action string `json:"action"`
+ Installation struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Account struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"account"`
+ RepositorySelection string `json:"repository_selection"`
+ AccessTokensURL string `json:"access_tokens_url"`
+ RepositoriesURL string `json:"repositories_url"`
+ HTMLURL string `json:"html_url"`
+ AppID int `json:"app_id"`
+ TargetID int `json:"target_id"`
+ TargetType string `json:"target_type"`
+ Permissions struct {
+ Issues string `json:"issues"`
+ Metadata string `json:"metadata"`
+ PullRequests string `json:"pull_requests"`
+ RepositoryProjects string `json:"repository_projects"`
+ VulnerabilityAlerts string `json:"vulnerability_alerts"`
+ Statuses string `json:"statuses"`
+ Administration string `json:"administration"`
+ Deployments string `json:"deployments"`
+ Contents string `json:"contents"`
+ } `json:"permissions"`
+ Events []string `json:"events"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ SingleFileName *string `json:"single_file_name"`
+ } `json:"installation"`
+ RepositoriesAdded []struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ } `json:"repositories_added"`
+ RepositoriesRemoved []struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ } `json:"repositories_removed"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// IssueCommentPayload contains the information for GitHub's issue_comment hook event
+type IssueCommentPayload struct {
+ Action string `json:"action"`
+ Issue struct {
+ URL string `json:"url"`
+ LabelsURL string `json:"labels_url"`
+ CommentsURL string `json:"comments_url"`
+ EventsURL string `json:"events_url"`
+ HTMLURL string `json:"html_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Number int64 `json:"number"`
+ Title string `json:"title"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Labels []struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Description string `json:"description"`
+ URL string `json:"url"`
+ Name string `json:"name"`
+ Color string `json:"color"`
+ Default bool `json:"default"`
+ } `json:"labels"`
+ State string `json:"state"`
+ Locked bool `json:"locked"`
+ Assignee *Assignee `json:"assignee"`
+ Assignees []*Assignee `json:"assignees"`
+ Milestone *Milestone `json:"milestone"`
+ Comments int64 `json:"comments"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ ClosedAt *time.Time `json:"closed_at"`
+ PullRequest *struct {
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ DiffURL string `json:"diff_url"`
+ PatchURL string `json:"patch_url"`
+ } `json:"pull_request"`
+ Body string `json:"body"`
+ } `json:"issue"`
+ Comment struct {
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ IssueURL string `json:"issue_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ Body string `json:"body"`
+ AuthorAssociation string `json:"author_association"`
+ } `json:"comment"`
+ Changes *struct {
+ Body *struct {
+ From string `json:"from"`
+ } `json:"body"`
+ } `json:"changes"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// IssuesPayload contains the information for GitHub's issues hook event
+type IssuesPayload struct {
+ Action string `json:"action"`
+ Issue struct {
+ URL string `json:"url"`
+ LabelsURL string `json:"labels_url"`
+ CommentsURL string `json:"comments_url"`
+ EventsURL string `json:"events_url"`
+ HTMLURL string `json:"html_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Number int64 `json:"number"`
+ Title string `json:"title"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Labels []struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Description string `json:"description"`
+ URL string `json:"url"`
+ Name string `json:"name"`
+ Color string `json:"color"`
+ Default bool `json:"default"`
+ } `json:"labels"`
+ State string `json:"state"`
+ Locked bool `json:"locked"`
+ Assignee *Assignee `json:"assignee"`
+ Assignees []*Assignee `json:"assignees"`
+ Milestone *Milestone `json:"milestone"`
+ Comments int64 `json:"comments"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ ClosedAt *time.Time `json:"closed_at"`
+ Body string `json:"body"`
+ } `json:"issue"`
+ Changes *struct {
+ Title *struct {
+ From string `json:"from"`
+ } `json:"title"`
+ Body *struct {
+ From string `json:"from"`
+ } `json:"body"`
+ } `json:"changes"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+ Assignee *Assignee `json:"assignee"`
+ Label *Label `json:"label"`
+}
+
+// LabelPayload contains the information for GitHub's label hook event
+type LabelPayload struct {
+ Action string `json:"action"`
+ Label struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Description string `json:"description"`
+ URL string `json:"url"`
+ Name string `json:"name"`
+ Color string `json:"color"`
+ } `json:"label"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description *string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ HooksURL string `json:"hooks_url"`
+ IssuesURL string `json:"issues_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ Description string `json:"description"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// MemberPayload contains the information for GitHub's member hook event
+type MemberPayload struct {
+ Action string `json:"action"`
+ Member struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"member"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// MembershipPayload contains the information for GitHub's membership hook event
+type MembershipPayload struct {
+ Action string `json:"action"`
+ Scope string `json:"scope"`
+ Member struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"member"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+ Team *Team `json:"team"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ } `json:"organization"`
+}
+
+// MetaPayload contains the information for GitHub's meta hook event
+type MetaPayload struct {
+ HookID int `json:"hook_id"`
+ Hook struct {
+ Type string `json:"type"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ Active bool `json:"active"`
+ Events []string `json:"events"`
+ AppID int `json:"app_id"`
+ Config struct {
+ ContentType string `json:"content_type"`
+ InsecureSSL string `json:"insecure_ssl"`
+ Secret string `json:"secret"`
+ URL string `json:"url"`
+ } `json:"config"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ } `json:"hook"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// MilestonePayload contains the information for GitHub's milestone hook event
+type MilestonePayload struct {
+ Action string `json:"action"`
+ Milestone struct {
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ LabelsURL string `json:"labels_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Number int64 `json:"number"`
+ Title string `json:"title"`
+ Description *string `json:"description"`
+ Creator struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"creator"`
+ OpenIssues int64 `json:"open_issues"`
+ ClosedIssues int64 `json:"closed_issues"`
+ State string `json:"state"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DueOn *time.Time `json:"due_on"`
+ ClosedAt *time.Time `json:"closed_at"`
+ } `json:"milestone"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description *string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ HooksURL string `json:"hooks_url"`
+ IssuesURL string `json:"issues_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ Description string `json:"description"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// OrganizationPayload contains the information for GitHub's organization hook event
+type OrganizationPayload struct {
+ Action string `json:"action"`
+ Invitation struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Login string `json:"login"`
+ Email *string `json:"email"`
+ Role string `json:"role"`
+ } `json:"invitation"`
+ Membership struct {
+ URL string `json:"url"`
+ State string `json:"state"`
+ Role string `json:"role"`
+ OrganizationURL string `json:"organization_url"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ } `json:"membership"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ HooksURL string `json:"hooks_url"`
+ IssuesURL string `json:"issues_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ Description string `json:"description"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// OrgBlockPayload contains the information for GitHub's org_block hook event
+type OrgBlockPayload struct {
+ Action string `json:"action"`
+ BlockedUser struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"blocked_user"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ HooksURL string `json:"hooks_url"`
+ IssuesURL string `json:"issues_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ Description string `json:"description"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// PageBuildPayload contains the information for GitHub's page_build hook event
+type PageBuildPayload struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Build struct {
+ URL string `json:"url"`
+ Status string `json:"status"`
+ Error struct {
+ Message *string `json:"message"`
+ } `json:"error"`
+ Pusher struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"pusher"`
+ Commit string `json:"commit"`
+ Duration int64 `json:"duration"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ } `json:"build"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// PingPayload contains the information for GitHub's ping hook event
+type PingPayload struct {
+ HookID int `json:"hook_id"`
+ Hook struct {
+ Type string `json:"type"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ Active bool `json:"active"`
+ Events []string `json:"events"`
+ AppID int `json:"app_id"`
+ Config struct {
+ ContentType string `json:"content_type"`
+ InsecureSSL string `json:"insecure_ssl"`
+ Secret string `json:"secret"`
+ URL string `json:"url"`
+ } `json:"config"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ } `json:"hook"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// ProjectCardPayload contains the information for GitHub's project_payload hook event
+type ProjectCardPayload struct {
+ Action string `json:"action"`
+ ProjectCard struct {
+ URL string `json:"url"`
+ ProjectURL string `json:"project_url"`
+ ColumnURL string `json:"column_url"`
+ ColumnID int64 `json:"column_id"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Note *string `json:"note"`
+ Creator struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"creator"`
+ CreatedAt int64 `json:"created_at"`
+ UpdatedAt int64 `json:"updated_at"`
+ ContentURL string `json:"content_url"`
+ } `json:"project_card"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// ProjectColumnPayload contains the information for GitHub's project_column hook event
+type ProjectColumnPayload struct {
+ Action string `json:"action"`
+ ProjectColumn struct {
+ URL string `json:"url"`
+ ProjectURL string `json:"project_url"`
+ CardsURL string `json:"cards_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ CreatedAt int64 `json:"created_at"`
+ UpdatedAt int64 `json:"updated_at"`
+ } `json:"project_column"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// ProjectPayload contains the information for GitHub's project hook event
+type ProjectPayload struct {
+ Action string `json:"action"`
+ Project struct {
+ OwnerURL string `json:"owner_url"`
+ URL string `json:"url"`
+ ColumnsURL string `json:"columns_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ Body string `json:"body"`
+ Number int64 `json:"number"`
+ State string `json:"state"`
+ Creator struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"creator"`
+ CreatedAt int64 `json:"created_at"`
+ UpdatedAt int64 `json:"updated_at"`
+ } `json:"project"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// PublicPayload contains the information for GitHub's public hook event
+type PublicPayload struct {
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// PullRequestPayload contains the information for GitHub's pull_request hook event
+type PullRequestPayload struct {
+ Action string `json:"action"`
+ Number int64 `json:"number"`
+ PullRequest struct {
+ URL string `json:"url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ HTMLURL string `json:"html_url"`
+ DiffURL string `json:"diff_url"`
+ PatchURL string `json:"patch_url"`
+ IssueURL string `json:"issue_url"`
+ Number int64 `json:"number"`
+ State string `json:"state"`
+ Locked bool `json:"locked"`
+ Title string `json:"title"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Body string `json:"body"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ ClosedAt *time.Time `json:"closed_at"`
+ MergedAt *time.Time `json:"merged_at"`
+ MergeCommitSha *string `json:"merge_commit_sha"`
+ Assignee *Assignee `json:"assignee"`
+ Assignees []*Assignee `json:"assignees"`
+ Milestone *Milestone `json:"milestone"`
+ Draft bool `json:"draft"`
+ CommitsURL string `json:"commits_url"`
+ ReviewCommentsURL string `json:"review_comments_url"`
+ ReviewCommentURL string `json:"review_comment_url"`
+ CommentsURL string `json:"comments_url"`
+ StatusesURL string `json:"statuses_url"`
+ RequestedReviewers []struct {
+ Login string `json:"login"`
+ ID int `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"requested_reviewers,omitempty"`
+ Labels []struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Description string `json:"description"`
+ URL string `json:"url"`
+ Name string `json:"name"`
+ Color string `json:"color"`
+ Default bool `json:"default"`
+ } `json:"labels"`
+ Head struct {
+ Label string `json:"label"`
+ Ref string `json:"ref"`
+ Sha string `json:"sha"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Repo struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repo"`
+ } `json:"head"`
+ Base struct {
+ Label string `json:"label"`
+ Ref string `json:"ref"`
+ Sha string `json:"sha"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Repo struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repo"`
+ } `json:"base"`
+ Links struct {
+ Self struct {
+ Href string `json:"href"`
+ } `json:"self"`
+ HTML struct {
+ Href string `json:"href"`
+ } `json:"html"`
+ Issue struct {
+ Href string `json:"href"`
+ } `json:"issue"`
+ Comments struct {
+ Href string `json:"href"`
+ } `json:"comments"`
+ ReviewComments struct {
+ Href string `json:"href"`
+ } `json:"review_comments"`
+ ReviewComment struct {
+ Href string `json:"href"`
+ } `json:"review_comment"`
+ Commits struct {
+ Href string `json:"href"`
+ } `json:"commits"`
+ Statuses struct {
+ Href string `json:"href"`
+ } `json:"statuses"`
+ } `json:"_links"`
+ Merged bool `json:"merged"`
+ Mergeable *bool `json:"mergeable"`
+ MergeableState string `json:"mergeable_state"`
+ MergedBy *MergedBy `json:"merged_by"`
+ Comments int64 `json:"comments"`
+ ReviewComments int64 `json:"review_comments"`
+ Commits int64 `json:"commits"`
+ Additions int64 `json:"additions"`
+ Deletions int64 `json:"deletions"`
+ ChangedFiles int64 `json:"changed_files"`
+ } `json:"pull_request"`
+ Label struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Description string `json:"description"`
+ URL string `json:"url"`
+ Name string `json:"name"`
+ Color string `json:"color"`
+ Default bool `json:"default"`
+ } `json:"label"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ NodeID string `json:"node_id"`
+ ID int64 `json:"id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+ Changes *struct {
+ Title *struct {
+ From string `json:"from"`
+ } `json:"title"`
+ Body *struct {
+ From string `json:"from"`
+ } `json:"body"`
+ } `json:"changes"`
+ Assignee *Assignee `json:"assignee"`
+ RequestedReviewer *Assignee `json:"requested_reviewer"`
+ RequestedTeam struct {
+ Name string `json:"name"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Slug string `json:"slug"`
+ Description string `json:"description"`
+ Privacy string `json:"privacy"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ MembersURL string `json:"members_url"`
+ RepositoriesURL string `json:"repositories_url"`
+ Permission string `json:"permission"`
+ } `json:"requested_team"`
+ Installation struct {
+ ID int64 `json:"id"`
+ } `json:"installation"`
+}
+
+// PullRequestReviewCommentPayload contains the information for GitHub's pull_request_review_comments hook event
+type PullRequestReviewCommentPayload struct {
+ Action string `json:"action"`
+ Comment struct {
+ URL string `json:"url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ DiffHunk string `json:"diff_hunk"`
+ Path string `json:"path"`
+ Position int64 `json:"position"`
+ OriginalPosition int64 `json:"original_position"`
+ CommitID string `json:"commit_id"`
+ OriginalCommitID string `json:"original_commit_id"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Body string `json:"body"`
+ AuthorAssociation string `json:"author_association"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ HTMLURL string `json:"html_url"`
+ PullRequestURL string `json:"pull_request_url"`
+ Links struct {
+ Self struct {
+ Href string `json:"href"`
+ } `json:"self"`
+ HTML struct {
+ Href string `json:"href"`
+ } `json:"html"`
+ PullRequest struct {
+ Href string `json:"href"`
+ } `json:"pull_request"`
+ } `json:"_links"`
+ InReplyToID int64 `json:"in_reply_to_id"`
+ } `json:"comment"`
+ PullRequest struct {
+ URL string `json:"url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ HTMLURL string `json:"html_url"`
+ DiffURL string `json:"diff_url"`
+ PatchURL string `json:"patch_url"`
+ IssueURL string `json:"issue_url"`
+ Number int64 `json:"number"`
+ State string `json:"state"`
+ Locked bool `json:"locked"`
+ Title string `json:"title"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Body string `json:"body"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ ClosedAt *time.Time `json:"closed_at"`
+ MergedAt *time.Time `json:"merged_at"`
+ MergeCommitSha string `json:"merge_commit_sha"`
+ Assignee *Assignee `json:"assignee"`
+ Assignees []*Assignee `json:"assignees"`
+ Milestone *Milestone `json:"milestone"`
+ CommitsURL string `json:"commits_url"`
+ ReviewCommentsURL string `json:"review_comments_url"`
+ ReviewCommentURL string `json:"review_comment_url"`
+ CommentsURL string `json:"comments_url"`
+ StatusesURL string `json:"statuses_url"`
+ Head struct {
+ Label string `json:"label"`
+ Ref string `json:"ref"`
+ Sha string `json:"sha"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Repo struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repo"`
+ } `json:"head"`
+ Base struct {
+ Label string `json:"label"`
+ Ref string `json:"ref"`
+ Sha string `json:"sha"`
+ User struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"user"`
+ Repo struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repo"`
+ } `json:"base"`
+ Links struct {
+ Self struct {
+ Href string `json:"href"`
+ } `json:"self"`
+ HTML struct {
+ Href string `json:"href"`
+ } `json:"html"`
+ Issue struct {
+ Href string `json:"href"`
+ } `json:"issue"`
+ Comments struct {
+ Href string `json:"href"`
+ } `json:"comments"`
+ ReviewComments struct {
+ Href string `json:"href"`
+ } `json:"review_comments"`
+ ReviewComment struct {
+ Href string `json:"href"`
+ } `json:"review_comment"`
+ Commits struct {
+ Href string `json:"href"`
+ } `json:"commits"`
+ Statuses struct {
+ Href string `json:"href"`
+ } `json:"statuses"`
+ } `json:"_links"`
+ } `json:"pull_request"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+ Installation struct {
+ ID int64 `json:"id"`
+ } `json:"installation"`
+}
+
+// PushPayload contains the information for GitHub's push hook event
+type PushPayload struct {
+ Ref string `json:"ref"`
+ Before string `json:"before"`
+ After string `json:"after"`
+ Created bool `json:"created"`
+ Deleted bool `json:"deleted"`
+ Forced bool `json:"forced"`
+ BaseRef *string `json:"base_ref"`
+ Compare string `json:"compare"`
+ Commits []struct {
+ Sha string `json:"sha"`
+ ID string `json:"id"`
+ NodeID string `json:"node_id"`
+ TreeID string `json:"tree_id"`
+ Distinct bool `json:"distinct"`
+ Message string `json:"message"`
+ Timestamp string `json:"timestamp"`
+ URL string `json:"url"`
+ Author struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ Username string `json:"username"`
+ } `json:"author"`
+ Committer struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ Username string `json:"username"`
+ } `json:"committer"`
+ Added []string `json:"added"`
+ Removed []string `json:"removed"`
+ Modified []string `json:"modified"`
+ } `json:"commits"`
+ HeadCommit struct {
+ ID string `json:"id"`
+ NodeID string `json:"node_id"`
+ TreeID string `json:"tree_id"`
+ Distinct bool `json:"distinct"`
+ Message string `json:"message"`
+ Timestamp string `json:"timestamp"`
+ URL string `json:"url"`
+ Author struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ Username string `json:"username"`
+ } `json:"author"`
+ Committer struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ Username string `json:"username"`
+ } `json:"committer"`
+ Added []string `json:"added"`
+ Removed []string `json:"removed"`
+ Modified []string `json:"modified"`
+ } `json:"head_commit"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt int64 `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt int64 `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ Stargazers int64 `json:"stargazers"`
+ MasterBranch string `json:"master_branch"`
+ } `json:"repository"`
+ Pusher struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ } `json:"pusher"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+ Installation struct {
+ ID int `json:"id"`
+ } `json:"installation"`
+}
+
+// ReleasePayload contains the information for GitHub's release hook event
+type ReleasePayload struct {
+ Action string `json:"action"`
+ Release struct {
+ URL string `json:"url"`
+ AssetsURL string `json:"assets_url"`
+ UploadURL string `json:"upload_url"`
+ HTMLURL string `json:"html_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ TagName string `json:"tag_name"`
+ TargetCommitish string `json:"target_commitish"`
+ Name *string `json:"name"`
+ Draft bool `json:"draft"`
+ Author struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"author"`
+ Prerelease bool `json:"prerelease"`
+ CreatedAt time.Time `json:"created_at"`
+ PublishedAt time.Time `json:"published_at"`
+ Assets []Asset `json:"assets"`
+ TarballURL string `json:"tarball_url"`
+ ZipballURL string `json:"zipball_url"`
+ Body *string `json:"body"`
+ } `json:"release"`
+ Repository struct {
+ ID int64 `json:"id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+ Installation struct {
+ ID int `json:"id"`
+ } `json:"installation"`
+}
+
+// RepositoryPayload contains the information for GitHub's repository hook event
+type RepositoryPayload struct {
+ Action string `json:"action"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// RepositoryVulnerabilityAlertEvent contains the information for GitHub's repository_vulnerability_alert hook event.
+type RepositoryVulnerabilityAlertPayload struct {
+ Action string `json:"action"`
+ Alert struct {
+ ID int64 `json:"id"`
+ Summary string `json:"summary"`
+ AffectedRange string `json:"affected_range"`
+ AffectedPackageName string `json:"affected_package_name"`
+ ExternalReference string `json:"external_reference"`
+ ExternalIdentifier string `json:"external_identifier"`
+ FixedIn string `json:"fixed_in"`
+ Dismisser struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"dismisser"`
+ } `json:"alert"`
+}
+
+// SecurityAdvisoryPayload contains the information for GitHub's security_advisory hook event.
+type SecurityAdvisoryPayload struct {
+ Action string `json:"action"`
+ SecurityAdvisory struct {
+ GHSAID string `json:"ghsa_id"`
+ Summary string `json:"summary"`
+ Description string `json:"description"`
+ Severity string `json:"string"`
+ Identifiers []struct {
+ Value string `json:"value"`
+ Type string `json:"type"`
+ } `json:"identifiers"`
+ References []struct {
+ URL string `json:"url"`
+ } `json:"references"`
+ PublishedAt time.Time `json:"published_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ WithdrawnAt *time.Time `json:"withdrawn_at"`
+ Vulnerabilities []struct {
+ Package struct {
+ Ecosystem string `json:"ecosystem"`
+ Name string `json:"name"`
+ }
+ Severity string `json:"severity"`
+ VulnerableVersionRange string `json:"vulnerable_version_range"`
+ FirstPatchedVersion *struct {
+ Identifier string `json:"identifier"`
+ } `json:"first_patched_version"`
+ } `json:"vulnerabilities"`
+ } `json:"security_advisory"`
+}
+
+// StatusPayload contains the information for GitHub's status hook event
+type StatusPayload struct {
+ ID int64 `json:"id"`
+ Sha string `json:"sha"`
+ Name string `json:"name"`
+ TargetURL *string `json:"target_url"`
+ Context string `json:"context"`
+ Description *string `json:"description"`
+ State string `json:"state"`
+ Commit struct {
+ Sha string `json:"sha"`
+ NodeID string `json:"node_id"`
+ Commit struct {
+ Author struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ Date time.Time `json:"date"`
+ } `json:"author"`
+ Committer struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ Date time.Time `json:"date"`
+ } `json:"committer"`
+ Message string `json:"message"`
+ Tree struct {
+ Sha string `json:"sha"`
+ URL string `json:"url"`
+ } `json:"tree"`
+ URL string `json:"url"`
+ CommentCount int64 `json:"comment_count"`
+ } `json:"commit"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ CommentsURL string `json:"comments_url"`
+ Author struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"author"`
+ Committer struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"committer"`
+ Parents []Parent `json:"parents"`
+ } `json:"commit"`
+ Branches []struct {
+ Name string `json:"name"`
+ Commit struct {
+ Sha string `json:"sha"`
+ URL string `json:"url"`
+ } `json:"commit"`
+ } `json:"branches"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// TeamPayload contains the information for GitHub's team hook event
+type TeamPayload struct {
+ Action string `json:"action"`
+ Team *Team `json:"team"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ HooksURL string `json:"hooks_url"`
+ IssuesURL string `json:"issues_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ Description string `json:"description"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// TeamAddPayload contains the information for GitHub's team_add hook event
+type TeamAddPayload struct {
+ Team *Team `json:"team"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ Description *string `json:"description"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// WatchPayload contains the information for GitHub's watch hook event
+type WatchPayload struct {
+ Action string `json:"action"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// WorkflowDispatchPayload contains the information for GitHub's workflow dispatch event
+type WorkflowDispatchPayload struct {
+ Inputs struct {
+ Name string `json:"name"`
+ }
+ Ref string `json:"ref"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ Private bool `json:"private"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ HooksURL string `json:"hooks_url"`
+ IssuesURL string `json:"issues_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ Description string `json:"description"`
+ } `json:"organization"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+ Workflow string `json:"workflow"`
+}
+
+// WorkflowJobPayload contains the information for GitHub's workflow job event
+type WorkflowJobPayload struct {
+ Action string `json:"action"`
+ WorkflowJob struct {
+ ID int64 `json:"id"`
+ RunID int64 `json:"run_id"`
+ RunURL string `json:"run_url"`
+ RunAttempt int64 `json:"run_attempt"`
+ NodeID string `json:"node_id"`
+ HeadSha string `json:"head_sha"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ Status string `json:"status"`
+ Conclusion string `json:"conclusion"`
+ StartedAt time.Time `json:"started_at"`
+ CompletedAt time.Time `json:"completed_at"`
+ Name string `json:"name"`
+ Steps []struct {
+ Name string `json:"name"`
+ Status string `json:"status"`
+ Conclusion string `json:"conclusion"`
+ Number int64 `json:"number"`
+ StartedAt time.Time `json:"started_at"`
+ CompletedAt time.Time `json:"completed_at"`
+ } `json:"steps"`
+ CheckRunURL string `json:"check_run_url"`
+ Labels []string `json:"labels"`
+ RunnerID int64 `json:"runner_id"`
+ RunnerName string `json:"runner_name"`
+ RunnerGroupID int64 `json:"runner_group_id"`
+ RunnerGroupName string `json:"runner_group_name"`
+ } `json:"workflow_job"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasProjects bool `json:"has_projects"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ Archived bool `json:"archived"`
+ Disabled bool `json:"disabled"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ License struct {
+ Key string `json:"key"`
+ Name string `json:"name"`
+ SpdxID string `json:"spdx_id"`
+ URL string `json:"url"`
+ NodeID string `json:"node_id"`
+ } `json:"license"`
+ AllowForking bool `json:"allow_forking"`
+ IsTemplate bool `json:"is_template"`
+ // Topics []interface{} `json:"topics"`
+ Visibility string `json:"visibility"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ HooksURL string `json:"hooks_url"`
+ IssuesURL string `json:"issues_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ Description string `json:"description"`
+ } `json:"organization"`
+ Enterprise struct {
+ ID int64 `json:"id"`
+ Slug string `json:"slug"`
+ Name string `json:"name"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ // Description interface{} `json:"description"`
+ // WebsiteURL interface{} `json:"website_url"`
+ HTMLURL string `json:"html_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ } `json:"enterprise"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// WorkflowRunPayload contains the information for GitHub's workflow run event
+type WorkflowRunPayload struct {
+ Action string `json:"action"`
+ WorkflowRun struct {
+ ID int64 `json:"id"`
+ Name string `json:"name"`
+ NodeID string `json:"node_id"`
+ HeadBranch string `json:"head_branch"`
+ HeadSha string `json:"head_sha"`
+ RunNumber int64 `json:"run_number"`
+ Event string `json:"event"`
+ Status string `json:"status"`
+ Conclusion string `json:"conclusion"`
+ WorkflowID int64 `json:"workflow_id"`
+ CheckSuiteID int64 `json:"check_suite_id"`
+ CheckSuiteNodeID string `json:"check_suite_node_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ // PullRequests []interface{} `json:"pull_requests"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ RunAttempt int64 `json:"run_attempt"`
+ RunStartedAt time.Time `json:"run_started_at"`
+ JobsURL string `json:"jobs_url"`
+ LogsURL string `json:"logs_url"`
+ CheckSuiteURL string `json:"check_suite_url"`
+ ArtifactsURL string `json:"artifacts_url"`
+ CancelURL string `json:"cancel_url"`
+ RerunURL string `json:"rerun_url"`
+ // PreviousAttemptURL interface{} `json:"previous_attempt_url"`
+ WorkflowURL string `json:"workflow_url"`
+ HeadCommit struct {
+ ID string `json:"id"`
+ TreeID string `json:"tree_id"`
+ Message string `json:"message"`
+ Timestamp time.Time `json:"timestamp"`
+ Author struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ } `json:"author"`
+ Committer struct {
+ Name string `json:"name"`
+ Email string `json:"email"`
+ } `json:"committer"`
+ } `json:"head_commit"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ } `json:"repository"`
+ HeadRepository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ } `json:"head_repository"`
+ } `json:"workflow_run"`
+ Workflow struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ Path string `json:"path"`
+ State string `json:"state"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ BadgeURL string `json:"badge_url"`
+ } `json:"workflow"`
+ Repository struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Private bool `json:"private"`
+ Owner struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"owner"`
+ HTMLURL string `json:"html_url"`
+ Description string `json:"description"`
+ Fork bool `json:"fork"`
+ URL string `json:"url"`
+ ForksURL string `json:"forks_url"`
+ KeysURL string `json:"keys_url"`
+ CollaboratorsURL string `json:"collaborators_url"`
+ TeamsURL string `json:"teams_url"`
+ HooksURL string `json:"hooks_url"`
+ IssueEventsURL string `json:"issue_events_url"`
+ EventsURL string `json:"events_url"`
+ AssigneesURL string `json:"assignees_url"`
+ BranchesURL string `json:"branches_url"`
+ TagsURL string `json:"tags_url"`
+ BlobsURL string `json:"blobs_url"`
+ GitTagsURL string `json:"git_tags_url"`
+ GitRefsURL string `json:"git_refs_url"`
+ TreesURL string `json:"trees_url"`
+ StatusesURL string `json:"statuses_url"`
+ LanguagesURL string `json:"languages_url"`
+ StargazersURL string `json:"stargazers_url"`
+ ContributorsURL string `json:"contributors_url"`
+ SubscribersURL string `json:"subscribers_url"`
+ SubscriptionURL string `json:"subscription_url"`
+ CommitsURL string `json:"commits_url"`
+ GitCommitsURL string `json:"git_commits_url"`
+ CommentsURL string `json:"comments_url"`
+ IssueCommentURL string `json:"issue_comment_url"`
+ ContentsURL string `json:"contents_url"`
+ CompareURL string `json:"compare_url"`
+ MergesURL string `json:"merges_url"`
+ ArchiveURL string `json:"archive_url"`
+ DownloadsURL string `json:"downloads_url"`
+ IssuesURL string `json:"issues_url"`
+ PullsURL string `json:"pulls_url"`
+ MilestonesURL string `json:"milestones_url"`
+ NotificationsURL string `json:"notifications_url"`
+ LabelsURL string `json:"labels_url"`
+ ReleasesURL string `json:"releases_url"`
+ DeploymentsURL string `json:"deployments_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ PushedAt time.Time `json:"pushed_at"`
+ GitURL string `json:"git_url"`
+ SSHURL string `json:"ssh_url"`
+ CloneURL string `json:"clone_url"`
+ SvnURL string `json:"svn_url"`
+ Homepage *string `json:"homepage"`
+ Size int64 `json:"size"`
+ StargazersCount int64 `json:"stargazers_count"`
+ WatchersCount int64 `json:"watchers_count"`
+ Language *string `json:"language"`
+ HasIssues bool `json:"has_issues"`
+ HasProjects bool `json:"has_projects"`
+ HasDownloads bool `json:"has_downloads"`
+ HasWiki bool `json:"has_wiki"`
+ HasPages bool `json:"has_pages"`
+ ForksCount int64 `json:"forks_count"`
+ MirrorURL *string `json:"mirror_url"`
+ Archived bool `json:"archived"`
+ Disabled bool `json:"disabled"`
+ OpenIssuesCount int64 `json:"open_issues_count"`
+ License struct {
+ Key string `json:"key"`
+ Name string `json:"name"`
+ SpdxID string `json:"spdx_id"`
+ URL string `json:"url"`
+ NodeID string `json:"node_id"`
+ } `json:"license"`
+ AllowForking bool `json:"allow_forking"`
+ IsTemplate bool `json:"is_template"`
+ // Topics []interface{} `json:"topics"`
+ Visibility string `json:"visibility"`
+ Forks int64 `json:"forks"`
+ OpenIssues int64 `json:"open_issues"`
+ Watchers int64 `json:"watchers"`
+ DefaultBranch string `json:"default_branch"`
+ } `json:"repository"`
+ Organization struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ HooksURL string `json:"hooks_url"`
+ IssuesURL string `json:"issues_url"`
+ MembersURL string `json:"members_url"`
+ PublicMembersURL string `json:"public_members_url"`
+ AvatarURL string `json:"avatar_url"`
+ Description string `json:"description"`
+ } `json:"organization"`
+ Enterprise struct {
+ ID int64 `json:"id"`
+ Slug string `json:"slug"`
+ Name string `json:"name"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ // Description interface{} `json:"description"`
+ // WebsiteURL interface{} `json:"website_url"`
+ HTMLURL string `json:"html_url"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ } `json:"enterprise"`
+ Sender struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"sender"`
+}
+
+// Assignee contains GitHub's assignee information
+type Assignee struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+}
+
+// Milestone contains GitHub's milestone information
+type Milestone struct {
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ LabelsURL string `json:"labels_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Number int64 `json:"number"`
+ State string `json:"state"`
+ Title string `json:"title"`
+ Description string `json:"description"`
+ Creator struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"creator"`
+ OpenIssues int64 `json:"open_issues"`
+ ClosedIssues int64 `json:"closed_issues"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ ClosedAt time.Time `json:"closed_at"`
+ DueOn time.Time `json:"due_on"`
+}
+
+// MergedBy contains GitHub's merged-by information
+type MergedBy struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+}
+
+// Asset contains GitHub's asset information
+type Asset struct {
+ URL string `json:"url"`
+ BrowserDownloadURL string `json:"browser_download_url"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Name string `json:"name"`
+ Label string `json:"label"`
+ State string `json:"state"`
+ ContentType string `json:"content_type"`
+ Size int64 `json:"size"`
+ DownloadCount int64 `json:"download_count"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ Uploader struct {
+ Login string `json:"login"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ AvatarURL string `json:"avatar_url"`
+ GravatarID string `json:"gravatar_id"`
+ URL string `json:"url"`
+ HTMLURL string `json:"html_url"`
+ FollowersURL string `json:"followers_url"`
+ FollowingURL string `json:"following_url"`
+ GistsURL string `json:"gists_url"`
+ StarredURL string `json:"starred_url"`
+ SubscriptionsURL string `json:"subscriptions_url"`
+ OrganizationsURL string `json:"organizations_url"`
+ ReposURL string `json:"repos_url"`
+ EventsURL string `json:"events_url"`
+ ReceivedEventsURL string `json:"received_events_url"`
+ Type string `json:"type"`
+ SiteAdmin bool `json:"site_admin"`
+ } `json:"uploader"`
+}
+
+// Parent contains GitHub's parent information
+type Parent struct {
+ URL string `json:"url"`
+ Sha string `json:"sha"`
+}
+
+// Label contains Issue's Label information
+type Label struct {
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ URL string `json:"url"`
+ Name string `json:"name"`
+ Color string `json:"color"`
+ Default bool `json:"default"`
+}
+
+// Team contains GitHub's Team information
+type Team struct {
+ Name string `json:"name"`
+ ID int64 `json:"id"`
+ NodeID string `json:"node_id"`
+ Slug string `json:"slug"`
+ Permission string `json:"permission"`
+ URL string `json:"url"`
+ MembersURL string `json:"members_url"`
+ RepositoriesURL string `json:"repositories_url"`
+ Parent *Team `json:"parent,omitempty"`
+}
+
+// Step contains workflow_job step information
+type Step struct {
+ Name string `json:"name"`
+ Status string `json:"status"`
+ Conclusion string `json:"conclusion"`
+ ID int64 `json:"id"`
+ StartedAt time.Time `json:"started_at"`
+ CompletedAt time.Time `json:"completed_at"`
+}
diff --git a/internal/pkg/pushChannel/lark/callback.go b/internal/pkg/pushChannel/lark/callback.go
new file mode 100644
index 0000000..9c735b4
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/callback.go
@@ -0,0 +1,97 @@
+package lark
+
+import (
+ "encoding/json"
+ "github.com/fastwego/feishu"
+ "github.com/gin-gonic/gin"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/config"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/pushChannel/lark/messageTemplate"
+ "github.com/lyleshaw/ospp-cr-bot/pkg/utils/log"
+ "github.com/valyala/fasttemplate"
+ "io/ioutil"
+ "strings"
+)
+
+func Callback(c *gin.Context) {
+ var req CallBackReq
+
+ err := c.Bind(&req)
+ larkCrypto := feishu.NewCrypto(FeishuConfig["EncryptKey"])
+ decryptMsg, err := larkCrypto.GetDecryptMsg(req.Encrypt)
+ if err != nil {
+ log.Errorf("err: %s\n", err.Error())
+ return
+ }
+ decryptMsgStr := string(decryptMsg)
+ if strings.Contains(decryptMsgStr, "url_verification") { // 这里判断一下 callback 究竟是初始的验证还是消息回调
+ var decodeReq DecodeCallBackReq
+
+ err = json.Unmarshal(decryptMsg, &decodeReq)
+ if err != nil {
+ log.Errorf("err: %s\n", err.Error())
+ return
+ }
+ callBackResp := CallBackResp{
+ Challenge: decodeReq.Challenge,
+ }
+ log.Infof("callBackResp:%+v\n", callBackResp)
+ c.JSON(200, callBackResp)
+ return
+ }
+ var messageCallBackResp MessageCallBackResp
+ err = json.Unmarshal(decryptMsg, &messageCallBackResp)
+ if err != nil {
+ log.Errorf("err: %s\n", err.Error())
+ return
+ }
+ c.JSON(200, nil)
+
+ // 发送消息
+ var groupIdMsg string
+ if messageCallBackResp.Event.Message.Content == "{\"text\":\"ID\"}" {
+ t := fasttemplate.New(messageTemplate.SendIdMsg, "{{", "}}")
+ groupIdMsg = t.ExecuteString(map[string]interface{}{
+ "ChatID": messageCallBackResp.Event.Sender.SenderID.OpenID,
+ })
+ }
+ if messageCallBackResp.Event.Message.ChatType == "group" {
+ t := fasttemplate.New(messageTemplate.SendIdMsg, "{{", "}}")
+ groupIdMsg = t.ExecuteString(map[string]interface{}{
+ "ChatID": messageCallBackResp.Event.Message.ChatID,
+ })
+ }
+ _, err = SendGroupMessage(messageCallBackResp.Event.Message.ChatID, groupIdMsg)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ return
+}
+
+func CardCallback(c *gin.Context) {
+ reqStr, _ := ioutil.ReadAll(c.Request.Body)
+ log.Infof("reqStr: %s", reqStr)
+ if strings.Contains(string(reqStr), "url_verification") {
+ var req DecodeCallBackReq
+ _ = json.Unmarshal(reqStr, &req)
+ log.Infof("req:%+v\n", req)
+ c.JSON(200, req)
+ return
+ }
+
+ var cardPostReq CardPostReq
+ err := json.Unmarshal(reqStr, &cardPostReq)
+ if err != nil {
+ log.Errorf("err: %+v\n", err)
+ log.Errorf("err: %s\n", err.Error())
+ return
+ }
+ // 卡片消息
+ log.Infof("cardPostReq:%+v\n", cardPostReq)
+ log.Infof("pre msqQueue:%+v\n", config.MsgQueue)
+ larkId, _ := config.QueryGithubIdByLarkId(cardPostReq.OpenId)
+ if _, ok := config.MsgQueue[larkId+cardPostReq.Action.Value.Numbers+cardPostReq.Action.Value.Type]; ok {
+ delete(config.MsgQueue, larkId+cardPostReq.Action.Value.Numbers+cardPostReq.Action.Value.Type)
+ }
+ log.Infof("after msqQueue:%+v\n", config.MsgQueue)
+ c.JSON(200, nil)
+}
diff --git a/internal/pkg/pushChannel/lark/lark.go b/internal/pkg/pushChannel/lark/lark.go
new file mode 100644
index 0000000..f363248
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/lark.go
@@ -0,0 +1,131 @@
+package lark
+
+import (
+ "context"
+ "log"
+ "net/http"
+ "net/url"
+ "os"
+ "os/signal"
+ "strings"
+ "syscall"
+ "time"
+
+ "github.com/faabiosr/cachego/file"
+
+ "github.com/fastwego/feishu"
+ "github.com/gin-gonic/gin"
+ "github.com/spf13/viper"
+)
+
+var FeishuClient *feishu.Client
+var FeishuConfig map[string]string
+
+var Atm *feishu.DefaultAccessTokenManager
+
+var (
+ LarkAppId string
+ LarkAppSecret string
+ VerificationToken string
+ EncryptKey string
+)
+
+func initConfig() {
+ viper.SetConfigFile(".env")
+ _ = viper.ReadInConfig()
+ //viper.AutomaticEnv()
+ if err := viper.BindEnv("LarkAppId"); err != nil {
+ log.Fatal(err)
+ }
+ LarkAppId = viper.GetString("LarkAppId")
+
+ if err := viper.BindEnv("LarkAppSecret"); err != nil {
+ log.Fatal(err)
+ }
+ LarkAppSecret = viper.GetString("LarkAppSecret")
+
+ if err := viper.BindEnv("VerificationToken"); err != nil {
+ log.Fatal(err)
+ }
+ VerificationToken = viper.GetString("VerificationToken")
+
+ if err := viper.BindEnv("EncryptKey"); err != nil {
+ log.Fatal(err)
+ }
+ EncryptKey = viper.GetString("EncryptKey")
+ FeishuConfig = map[string]string{
+ "AppId": LarkAppId,
+ "AppSecret": LarkAppSecret,
+ "VerificationToken": VerificationToken,
+ "EncryptKey": EncryptKey,
+ }
+}
+
+func init() {
+ initConfig()
+ // 内部应用 tenant_access_token 管理器
+ Atm = &feishu.DefaultAccessTokenManager{
+ Id: FeishuConfig["AppId"],
+ Cache: file.New(os.TempDir()),
+ GetRefreshRequestFunc: func() *http.Request {
+ payload := `{
+ "app_id":"` + FeishuConfig["AppId"] + `",
+ "app_secret":"` + FeishuConfig["AppSecret"] + `"
+ }`
+ req, _ := http.NewRequest(http.MethodPost, feishu.ServerUrl+"/open-apis/auth/v3/tenant_access_token/internal/", strings.NewReader(payload))
+
+ return req
+ },
+ }
+
+ FeishuClient = feishu.NewClient()
+
+}
+
+func main() {
+
+ router := gin.New()
+ router.Use(gin.Logger(), gin.Recovery())
+
+ router.POST("/api/feishu/callback", Callback)
+
+ router.GET("/open-apis/meeting_room/building/list", func(c *gin.Context) {
+
+ tenantAccessToken, err := Atm.GetAccessToken()
+ if err != nil {
+ log.Println(err)
+ return
+ }
+ params := url.Values{}
+ params.Add("page_size", "10")
+ request, _ := http.NewRequest(http.MethodGet, feishu.ServerUrl+"/open-apis/meeting_room/building/list?"+params.Encode(), nil)
+ resp, err := FeishuClient.Do(request, tenantAccessToken)
+ log.Println(string(resp), err)
+ })
+
+ //router.GET("/api/feishu/upload", Upload)
+
+ svr := &http.Server{
+ Addr: viper.GetString("LISTEN"),
+ Handler: router,
+ }
+
+ go func() {
+ err := svr.ListenAndServe()
+ if err != nil && err != http.ErrServerClosed {
+ log.Fatalln(err)
+ }
+ }()
+
+ quit := make(chan os.Signal)
+ signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
+ <-quit
+
+ timeout := time.Duration(5) * time.Second
+ ctx, cancel := context.WithTimeout(context.Background(), timeout)
+ defer cancel()
+
+ if err := svr.Shutdown(ctx); err != nil {
+ log.Fatalln(err)
+ }
+}
diff --git a/internal/pkg/pushChannel/lark/message.go b/internal/pkg/pushChannel/lark/message.go
new file mode 100644
index 0000000..14f9aa2
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/message.go
@@ -0,0 +1,256 @@
+package lark
+
+import (
+ "encoding/json"
+ "fmt"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/config"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/constants"
+ "github.com/lyleshaw/ospp-cr-bot/internal/pkg/pushChannel/lark/messageTemplate"
+ "github.com/lyleshaw/ospp-cr-bot/pkg/utils/log"
+ "github.com/sirupsen/logrus"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "strings"
+ "time"
+)
+
+var (
+ createMessageURL = "https://open.feishu.cn/open-apis/im/v1/messages"
+)
+
+func MsgTemplateUpgrade(msgTemplate string, receiver string) string {
+ msgTemplate = strings.Replace(msgTemplate, messageTemplate.PrTitle1, fmt.Sprintf(messageTemplate.PrTitle2, receiver), -1)
+ msgTemplate = strings.Replace(msgTemplate, messageTemplate.IssueTitle1, fmt.Sprintf(messageTemplate.IssueTitle2, receiver), -1)
+ msgTemplate = strings.Replace(msgTemplate, messageTemplate.PrCommentTitle1, messageTemplate.PrCommentTitle2, -1)
+ msgTemplate = strings.Replace(msgTemplate, messageTemplate.IssueCommentTitle1, messageTemplate.IssueCommentTitle2, -1)
+ msgTemplate = strings.Replace(msgTemplate, messageTemplate.PrReviewTitle1, messageTemplate.PrReviewTitle2, -1)
+ return msgTemplate
+}
+
+func SendGroupMessage(receiveID string, msgTemplate string) (*MessageItem, error) {
+ var err error
+ token, err := Atm.GetAccessToken()
+ cli := &http.Client{}
+
+ createReq := GenCreateMessageRequest(receiveID, msgTemplate, "interactive")
+ reqBytes, err := json.Marshal(createReq)
+ if err != nil {
+ logrus.WithError(err).Errorf("failed to marshal")
+ return nil, err
+ }
+
+ log.Infof("req: %+v", string(reqBytes))
+ req, err := http.NewRequest("POST", createMessageURL, strings.NewReader(string(reqBytes)))
+ if err != nil {
+ logrus.WithError(err).Errorf("new request failed")
+ return nil, err
+ }
+ req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token))
+ q := req.URL.Query()
+ q.Add("receive_id_type", "chat_id")
+ req.URL.RawQuery = q.Encode()
+
+ var logID string
+ resp, err := cli.Do(req)
+ if err != nil {
+ return nil, fmt.Errorf("create message failed, err=%v", err)
+ }
+ if resp != nil && resp.Header != nil {
+ logID = resp.Header.Get("x-tt-logid")
+ }
+ defer func(Body io.ReadCloser) {
+ err := Body.Close()
+ if err != nil {
+
+ }
+ }(resp.Body)
+
+ body, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ logrus.WithError(err).Error("read body failed")
+ return nil, err
+ }
+
+ createMessageResp := &CreateMessageResponse{}
+ err = json.Unmarshal(body, createMessageResp)
+ if err != nil {
+ logrus.WithError(err).Errorf("failed to unmarshal")
+ return nil, err
+ }
+ if createMessageResp.Code != 0 {
+ logrus.Errorf("failed to create message, code: %v, msg: %v, log_id: %v", createMessageResp.Code, createMessageResp.Message, logID)
+ return nil, fmt.Errorf("create message failed")
+ }
+ logrus.Infof("succeed create message, msg_id: %v", createMessageResp.Data.MessageID)
+ return createMessageResp.Data, nil
+}
+
+func SendMessage(receiveID string, msgTemplate string) (*MessageItem, error) {
+ var err error
+ token, err := Atm.GetAccessToken()
+ cli := &http.Client{}
+
+ createReq := GenCreateMessageRequest(receiveID, msgTemplate, "interactive")
+ reqBytes, err := json.Marshal(createReq)
+ if err != nil {
+ logrus.WithError(err).Errorf("failed to marshal")
+ return nil, err
+ }
+
+ log.Infof("receiveID=%s", receiveID)
+
+ req, err := http.NewRequest("POST", createMessageURL, strings.NewReader(string(reqBytes)))
+ if err != nil {
+ logrus.WithError(err).Errorf("new request failed")
+ return nil, err
+ }
+ req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token))
+ q := req.URL.Query()
+ q.Add("receive_id_type", "open_id")
+ req.URL.RawQuery = q.Encode()
+
+ var logID string
+ resp, err := cli.Do(req)
+ if err != nil {
+ return nil, fmt.Errorf("create message failed, err=%v", err)
+ }
+ if resp != nil && resp.Header != nil {
+ logID = resp.Header.Get("x-tt-logid")
+ }
+ defer func(Body io.ReadCloser) {
+ err := Body.Close()
+ if err != nil {
+
+ }
+ }(resp.Body)
+
+ body, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ logrus.WithError(err).Error("read body failed")
+ return nil, err
+ }
+
+ createMessageResp := &CreateMessageResponse{}
+ err = json.Unmarshal(body, createMessageResp)
+ if err != nil {
+ logrus.WithError(err).Errorf("failed to unmarshal")
+ return nil, err
+ }
+ if createMessageResp.Code != 0 {
+ logrus.Errorf("failed to create message, code: %v, msg: %v, log_id: %v", createMessageResp.Code, createMessageResp.Message, logID)
+ return nil, fmt.Errorf("create message failed")
+ }
+ logrus.Infof("succeed create message, msg_id: %v", createMessageResp.Data.MessageID)
+ return createMessageResp.Data, nil
+}
+
+func SendMessages(receiveID string, receivers []string, msgTemplate string, number string, gitHubEvent string) {
+ for _, receiver := range receivers {
+ if _, ok := config.MsgQueue[receiver+number+gitHubEvent]; !ok {
+ config.MsgQueue[receiver+number+gitHubEvent] = constants.Unread1
+ _, err := SendMessage(config.LarkMaps[receiver].Lark, msgTemplate)
+ if err != nil {
+ log.Errorf("send message failed, msgTemplate=%s, receivers=%+v, gitHubEvent=%s", msgTemplate, receivers, gitHubEvent)
+ log.Errorf("send message failed, err=%v", err)
+ }
+ log.Infof("msgQ=%v", config.MsgQueue)
+ } else {
+ if config.MsgQueue[receiver+number+gitHubEvent] == constants.READ {
+ // 已读,从队列中删除
+ delete(config.MsgQueue, receiver+number+gitHubEvent)
+ log.Infof("msgQ=%v", config.MsgQueue)
+ }
+ }
+ }
+ // 设置定时任务
+ time.AfterFunc(constants.TimeUnread1, func() {
+ TimeCheck1(receiveID, receivers, msgTemplate, number, gitHubEvent)
+ })
+}
+
+func TimeCheck1(receiveID string, receivers []string, msgTemplate string, number string, gitHubEvent string) {
+ for _, receiver := range receivers {
+ if _, ok := config.MsgQueue[receiver+number+gitHubEvent]; ok {
+ if config.MsgQueue[receiver+number+gitHubEvent] == constants.Unread1 {
+ // 如果第一次未读,则调整状态为第二次未读,并重新发送消息
+ config.MsgQueue[receiver+number+gitHubEvent] = constants.Unread2
+ _, err := SendMessage(config.LarkMaps[receiver].Lark, msgTemplate)
+ if err != nil {
+ log.Errorf("send message failed, msgTemplate=%s, receivers=%+v, gitHubEvent=%s", msgTemplate, receivers, gitHubEvent)
+ log.Errorf("send message failed, err=%v", err)
+ }
+ log.Infof("msgQ=%v", config.MsgQueue)
+ } else if config.MsgQueue[receiver+number+gitHubEvent] == constants.READ {
+ // 已读,从队列中删除
+ delete(config.MsgQueue, receiver+number+gitHubEvent)
+ log.Infof("msgQ=%v", config.MsgQueue)
+ }
+ }
+ }
+ // 设置定时任务
+ time.AfterFunc(constants.TimeUnread2, func() {
+ TimeCheck2(receiveID, receivers, msgTemplate, number, gitHubEvent)
+ })
+}
+
+func TimeCheck2(receiveID string, receivers []string, msgTemplate string, number string, gitHubEvent string) {
+ for _, receiver := range receivers {
+ if _, ok := config.MsgQueue[receiver+number+gitHubEvent]; ok {
+ if config.MsgQueue[receiver+number+gitHubEvent] == constants.Unread2 {
+ // 如果第二次未读,则调整状态为第三次未读,并发送消息给上级
+ config.MsgQueue[receiver+number+gitHubEvent] = constants.Unread3
+ msgTemplate = MsgTemplateUpgrade(msgTemplate, receiver)
+ if config.LarkMaps[receiver].Boss == "0" {
+ _, err := SendGroupMessage(receiveID, msgTemplate)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ continue
+ }
+ _, err := SendMessage(config.LarkMaps[config.LarkMaps[receiver].Boss].Lark, msgTemplate)
+ if err != nil {
+ log.Errorf("send message failed, msgTemplate=%s, receivers=%+v, gitHubEvent=%s", msgTemplate, receivers, gitHubEvent)
+ log.Errorf("send message failed, err=%v", err)
+ }
+ log.Infof("msgQ=%v", config.MsgQueue)
+ } else if config.MsgQueue[receiver+number+gitHubEvent] == constants.READ {
+ // 已读,从队列中删除
+ delete(config.MsgQueue, receiver+number+gitHubEvent)
+ log.Infof("msgQ=%v", config.MsgQueue)
+ }
+ }
+ }
+ // 设置定时任务
+ time.AfterFunc(constants.TimeUnread3, func() {
+ TimeCheck3(receiveID, receivers, msgTemplate, number, gitHubEvent)
+ })
+}
+
+func TimeCheck3(receiveID string, receivers []string, msgTemplate string, number string, gitHubEvent string) {
+ for _, receiver := range receivers {
+ if _, ok := config.MsgQueue[receiver+number+gitHubEvent]; ok {
+ if config.MsgQueue[receiver+number+gitHubEvent] == constants.Unread3 {
+ msgTemplate = MsgTemplateUpgrade(msgTemplate, receiver)
+ // 如果第三次未读,则从队列清除,并发送群消息
+ _, err := SendGroupMessage(receiveID, msgTemplate)
+ if err != nil {
+ log.Errorf("send message error: %+v", err)
+ }
+ delete(config.MsgQueue, receiver+number+gitHubEvent)
+ log.Infof("msgQ=%v", config.MsgQueue)
+ } else if config.MsgQueue[receiver+number+gitHubEvent] == constants.READ {
+ delete(config.MsgQueue, receiver+number+gitHubEvent)
+ log.Infof("msgQ=%v", config.MsgQueue)
+ }
+ }
+ }
+}
+
+func GenCreateMessageRequest(chatID, content, msgType string) *CreateMessageRequest {
+ return &CreateMessageRequest{
+ ReceiveID: chatID,
+ Content: content,
+ MsgType: msgType,
+ }
+}
diff --git a/internal/pkg/pushChannel/lark/messageTemplate/idMsg.go b/internal/pkg/pushChannel/lark/messageTemplate/idMsg.go
new file mode 100644
index 0000000..ef11726
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/messageTemplate/idMsg.go
@@ -0,0 +1,25 @@
+package messageTemplate
+
+const SendIdMsg = `{
+ "config": {
+ "wide_screen_mode": true
+ },
+ "header": {
+ "template": "blue",
+ "title": {
+ "content": " 飞书 ID",
+ "tag": "plain_text"
+ }
+ },
+ "i18n_elements": {
+ "zh_cn": [
+ {
+ "tag": "div",
+ "text": {
+ "content": "号码为:{{ChatID}}",
+ "tag": "lark_md"
+ }
+ }
+ ]
+ }
+}`
diff --git a/internal/pkg/pushChannel/lark/messageTemplate/issueCommentMsg.go b/internal/pkg/pushChannel/lark/messageTemplate/issueCommentMsg.go
new file mode 100644
index 0000000..ca826fc
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/messageTemplate/issueCommentMsg.go
@@ -0,0 +1,122 @@
+package messageTemplate
+
+const IssueCommentTitle1 = "有人在 Comment 中 @ 你!"
+const IssueCommentTitle2 = "有 Comment 待处理!"
+const IssueCommentMsg = `{
+ "config": {
+ "wide_screen_mode": true
+ },
+ "header": {
+ "template": "blue",
+ "title": {
+ "content": "⏰ {{Title}}",
+ "tag": "plain_text"
+ }
+ },
+ "elements": [
+ {
+ "fields": [
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🕐 时间:**\n{{Time}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📋 Issue 标题:**\n{{IssueTitle}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**👤 提出人:**\n{{Login}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 Issue 号:**\n{{IssueNumber}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 提醒人:**\n{{RequestedReviewers}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📜 Comment 内容:**\n{{IssueContent}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ }
+ ],
+ "tag": "div"
+ },
+ {
+ "tag": "hr"
+ },
+ {
+ "tag": "action",
+ "actions": [
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "确认收到"
+ },
+ "type": "primary",
+ "value": {
+ "type": "issue_comment",
+ "numbers": "{{IssueNumber}}"
+ }
+ },
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "跟进 Issue"
+ },
+ "url": "{{IssueURL}}",
+ "type": "primary"
+ }
+ ]
+ }
+ ]
+}`
diff --git a/internal/pkg/pushChannel/lark/messageTemplate/issueMsg.go b/internal/pkg/pushChannel/lark/messageTemplate/issueMsg.go
new file mode 100644
index 0000000..ec6a566
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/messageTemplate/issueMsg.go
@@ -0,0 +1,123 @@
+package messageTemplate
+
+const IssueTitle1 = "您有一个 Issue 待处理!"
+const IssueTitle2 = "%s 未处理 Issue!"
+const IssueMsg = `{
+ "config": {
+ "wide_screen_mode": true
+ },
+ "header": {
+ "template": "blue",
+ "title": {
+ "content": "⏰ {{Title}}",
+ "tag": "plain_text"
+ }
+ },
+ "elements": [
+ {
+ "fields": [
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🕐 时间:**\n{{Time}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📋 Issue 标题:**\n{{IssueTitle}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**👤 提出人:**\n{{Login}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 Issue 号:**\n{{IssueNumber}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 提醒人:**\n{{RequestedReviewers}}",
+ "tag": "lark_md"
+ }
+ },
+
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📜 Issue 内容:**\n{{IssueContent}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ }
+ ],
+ "tag": "div"
+ },
+ {
+ "tag": "hr"
+ },
+ {
+ "tag": "action",
+ "actions": [
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "确认收到"
+ },
+ "type": "primary",
+ "value": {
+ "type": "issues",
+ "numbers": "{{IssueNumber}}"
+ }
+ },
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "跟进 Issue"
+ },
+ "url": "{{IssueURL}}",
+ "type": "primary"
+ }
+ ]
+ }
+ ]
+}`
diff --git a/internal/pkg/pushChannel/lark/messageTemplate/prCommentMsg.go b/internal/pkg/pushChannel/lark/messageTemplate/prCommentMsg.go
new file mode 100644
index 0000000..363b64f
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/messageTemplate/prCommentMsg.go
@@ -0,0 +1,122 @@
+package messageTemplate
+
+const PrCommentTitle1 = "有人在 Comment 中 @ 你!"
+const PrCommentTitle2 = "有 Comment 待处理!"
+const PrCommentMsg = `{
+ "config": {
+ "wide_screen_mode": true
+ },
+ "header": {
+ "template": "blue",
+ "title": {
+ "content": "⏰ {{Title}}",
+ "tag": "plain_text"
+ }
+ },
+ "elements": [
+ {
+ "fields": [
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🕐 时间:**\n{{Time}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📋 PR 标题:**\n{{PRTitle}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**👤 提出人:**\n{{Login}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 PR 号:**\n{{PRNumber}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 提醒人:**\n{{RequestedReviewers}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📜 Comment 内容:**\n{{PRContent}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ }
+ ],
+ "tag": "div"
+ },
+ {
+ "tag": "hr"
+ },
+ {
+ "tag": "action",
+ "actions": [
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "确认收到"
+ },
+ "type": "primary",
+ "value": {
+ "type": "pull_request_review_comment",
+ "numbers": "{{PRNumber}}"
+ }
+ },
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "跟进 PR"
+ },
+ "url": "{{PRURL}}",
+ "type": "primary"
+ }
+ ]
+ }
+ ]
+}`
diff --git a/internal/pkg/pushChannel/lark/messageTemplate/prMsg.go b/internal/pkg/pushChannel/lark/messageTemplate/prMsg.go
new file mode 100644
index 0000000..d367b2c
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/messageTemplate/prMsg.go
@@ -0,0 +1,123 @@
+package messageTemplate
+
+const PrTitle1 = "您有一个 PullRequest 待处理!"
+const PrTitle2 = "%s 未处理 PullRequest!"
+const PrMsg = `{
+ "config": {
+ "wide_screen_mode": true
+ },
+ "header": {
+ "template": "blue",
+ "title": {
+ "content": "⏰ {{Title}}",
+ "tag": "plain_text"
+ }
+ },
+ "elements": [
+ {
+ "fields": [
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🕐 时间:**\n{{Time}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📋 PR 标题:**\n{{PRTitle}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**👤 提出人:**\n{{Login}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 PR 号:**\n{{PRNumber}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 提醒人:**\n{{RequestedReviewers}}",
+ "tag": "lark_md"
+ }
+ },
+
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📜 PR 内容:**\n{{PRContent}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ }
+ ],
+ "tag": "div"
+ },
+ {
+ "tag": "hr"
+ },
+ {
+ "tag": "action",
+ "actions": [
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "确认收到"
+ },
+ "type": "primary",
+ "value": {
+ "type": "pull_request",
+ "numbers": "{{PRNumber}}"
+ }
+ },
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "跟进 PR"
+ },
+ "url": "{{PRURL}}",
+ "type": "primary"
+ }
+ ]
+ }
+ ]
+}`
diff --git a/internal/pkg/pushChannel/lark/messageTemplate/prReviewMsg.go b/internal/pkg/pushChannel/lark/messageTemplate/prReviewMsg.go
new file mode 100644
index 0000000..879c2c2
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/messageTemplate/prReviewMsg.go
@@ -0,0 +1,122 @@
+package messageTemplate
+
+const PrReviewTitle1 = "有人在 Review 中 @ 你!"
+const PrReviewTitle2 = "有 Review 待处理!"
+const PrReviewMsg = `{
+ "config": {
+ "wide_screen_mode": true
+ },
+ "header": {
+ "template": "blue",
+ "title": {
+ "content": "⏰ GitHub PullRequest Review 提醒",
+ "tag": "plain_text"
+ }
+ },
+ "elements": [
+ {
+ "fields": [
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🕐 时间:**\n{{Time}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📋 PR 标题:**\n{{PRTitle}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**👤 提出人:**\n{{Login}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 PR 号:**\n{{PRNumber}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**🔢 提醒人:**\n{{RequestedReviewers}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": true,
+ "text": {
+ "content": "**📜 PR 内容:**\n{{PRContent}}",
+ "tag": "lark_md"
+ }
+ },
+ {
+ "is_short": false,
+ "text": {
+ "content": "",
+ "tag": "lark_md"
+ }
+ }
+ ],
+ "tag": "div"
+ },
+ {
+ "tag": "hr"
+ },
+ {
+ "tag": "action",
+ "actions": [
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "确认收到"
+ },
+ "type": "primary",
+ "value": {
+ "type": "pull_request_review",
+ "numbers": "{{PRNumber}}"
+ }
+ },
+ {
+ "tag": "button",
+ "text": {
+ "tag": "plain_text",
+ "content": "跟进 PR"
+ },
+ "url": "{{PRURL}}",
+ "type": "primary"
+ }
+ ]
+ }
+ ]
+}`
diff --git a/internal/pkg/pushChannel/lark/payload.go b/internal/pkg/pushChannel/lark/payload.go
new file mode 100644
index 0000000..bd1a51f
--- /dev/null
+++ b/internal/pkg/pushChannel/lark/payload.go
@@ -0,0 +1,231 @@
+package lark
+
+type CallBackReq struct {
+ Encrypt string `json:"encrypt"`
+}
+
+type DecodeCallBackReq struct {
+ Challenge string `json:"challenge"`
+ Token string `json:"token"`
+ Type string `json:"type"`
+}
+
+type CallBackResp struct {
+ Challenge string `json:"challenge"`
+}
+
+type MessageCallBackResp struct {
+ Schema string `json:"schema"`
+ Header struct {
+ EventID string `json:"event_id"`
+ EventType string `json:"event_type"`
+ CreateTime string `json:"create_time"`
+ Token string `json:"token"`
+ AppID string `json:"app_id"`
+ TenantKey string `json:"tenant_key"`
+ } `json:"header"`
+ Event struct {
+ Sender struct {
+ SenderID struct {
+ UnionID string `json:"union_id"`
+ UserID string `json:"user_id"`
+ OpenID string `json:"open_id"`
+ } `json:"sender_id"`
+ SenderType string `json:"sender_type"`
+ TenantKey string `json:"tenant_key"`
+ } `json:"sender"`
+ Message struct {
+ MessageID string `json:"message_id"`
+ RootID string `json:"root_id"`
+ ParentID string `json:"parent_id"`
+ CreateTime string `json:"create_time"`
+ ChatID string `json:"chat_id"`
+ ChatType string `json:"chat_type"`
+ MessageType string `json:"message_type"`
+ Content string `json:"content"`
+ Mentions []struct {
+ Key string `json:"key"`
+ ID struct {
+ UnionID string `json:"union_id"`
+ UserID string `json:"user_id"`
+ OpenID string `json:"open_id"`
+ } `json:"id"`
+ Name string `json:"name"`
+ TenantKey string `json:"tenant_key"`
+ } `json:"mentions"`
+ } `json:"message"`
+ } `json:"event"`
+}
+
+type SendMessageReq struct {
+ ReceiveID string `json:"receive_id"`
+ Content string `json:"content"`
+ MsgType string `json:"msg_type"`
+}
+
+type CardPostReq struct {
+ OpenId string `json:"open_id"`
+ UserId string `json:"user_id"`
+ OpenMessageId string `json:"open_message_id"`
+ TenantKey string `json:"tenant_key"`
+ Token string `json:"token"`
+ Action struct {
+ Value struct {
+ Type string `json:"type"`
+ Numbers string `json:"numbers"`
+ } `json:"value"`
+ Tag string `json:"tag"`
+ } `json:"action"`
+}
+
+/*
+ Message API Model
+*/
+
+type Header struct {
+ EventID string `json:"event_id"`
+ EventType string `json:"event_type"`
+ CreateTime string `json:"create_time"`
+ Token string `json:"token"`
+ AppID string `json:"app_id"`
+ TenantKey string `json:"tenant_key"`
+}
+
+type CreateMessageRequest struct {
+ ReceiveID string `json:"receive_id"`
+ Content string `json:"content"`
+ MsgType string `json:"msg_type"`
+}
+
+type CreateMessageResponse struct {
+ Code int `json:"code"`
+ Message string `json:"message"`
+ Data *MessageItem `json:"data"`
+}
+
+type MessageItem struct {
+ MessageID string `json:"message_id,omitempty"`
+ RootID string `json:"root_id,omitempty"`
+ ParentID string `json:"parent_id,omitempty"`
+ MsgType string `json:"msg_type,omitempty"`
+ CreateTime string `json:"create_time,omitempty"`
+ UpdateTime string `json:"update_time,omitempty"`
+ Deleted bool `json:"deleted,omitempty"`
+ ChatID string `json:"chat_id,omitempty"`
+ Sender *MessageSender `json:"sender,omitempty"`
+ Body *MessageBody `json:"body,omitempty"`
+}
+
+type MessageBody struct {
+ Content string `json:"content,omitempty"`
+}
+
+type MessageSender struct {
+ ID string `json:"id,omitempty"`
+ IDType string `json:"id_type,omitempty"`
+ SenderType string `json:"sender_type"`
+ TenantKey string `json:"tenant_key"`
+}
+
+type ReceiveEventEncrypt struct {
+ Encrypt string `json:"encrypt" form:"encrypt"`
+}
+
+type DecryptToken struct {
+ Challenge string `json:"challenge"`
+ Token string `json:"token"`
+ Type string `json:"type"`
+}
+
+type Event struct {
+ Schema string `json:"schema"`
+ Header Header `json:"header"`
+ Event interface{} `json:"event"`
+}
+
+type ReceiveMessageEvent struct {
+ Schema string `json:"schema"`
+ Header Header `json:"header"`
+ Event MessageEvent `json:"event"`
+}
+
+type MessageEvent struct {
+ Sender Sender `json:"sender"`
+ Message Message `json:"message"`
+}
+
+type Sender struct {
+ SenderID map[string]string `json:"sender_id"`
+ SenderType string `json:"sender_type"`
+ TenantKey string `json:"tenant_key"`
+}
+
+type Message struct {
+ MessageID string `json:"message_id"`
+ RootID string `json:"root_id"`
+ ParentID string `json:"parent_id"`
+ CreateTime string `json:"create_time"`
+ ChatID string `json:"chat_id"`
+ ChatType string `json:"chat_type"`
+ MessageType string `json:"message_type"`
+ Content string `json:"content"`
+ Mentions []*Mention `json:"mentions,omitempty"`
+}
+
+type Mention struct {
+ Key string `json:"key,omitempty"`
+ ID *UserID `json:"id,omitempty"`
+ Name string `json:"name,omitempty"`
+ TenantKey string `json:"tenant_key,omitempty"`
+}
+
+type MentionV1 struct {
+ Key string `json:"key,omitempty"`
+ ID string `json:"id,omitempty"`
+ IDType string `json:"id_type,omitempty"`
+ Name string `json:"name,omitempty"`
+ TenantKey string `json:"tenant_key,omitempty"`
+}
+
+type UserID struct {
+ UserID string `json:"user_id,omitempty"`
+ OpenID string `json:"open_id,omitempty"`
+ UnionID string `json:"union_id,omitempty"`
+}
+
+type GetMessageHistoryResponse struct {
+ Code int `json:"code"`
+ Message string `json:"message"`
+ Data *GetMessageHistoryBody `json:"data"`
+}
+
+type GetMessageHistoryBody struct {
+ HasMore bool `json:"has_more"`
+ PageToken string `json:"page_token,omitempty"`
+ Items []*GetMessageHistoryMessageItem `json:"items,omitempty"`
+}
+
+type GetMessageHistoryMessageItem struct {
+ MessageID string `json:"message_id,omitempty"`
+ RootID string `json:"root_id,omitempty"`
+ ParentID string `json:"parent_id,omitempty"`
+ MsgType string `json:"msg_type,omitempty"`
+ CreateTime string `json:"create_time,omitempty"`
+ UpdateTime string `json:"update_time,omitempty"`
+ Deleted bool `json:"deleted,omitempty"`
+ ChatID string `json:"chat_id,omitempty"`
+ Sender *MessageSender `json:"sender,omitempty"`
+ Body *MessageBody `json:"body,omitempty"`
+ Mentions []*MentionV1 `json:"mentions,omitempty"`
+ UpperMessageID string `json:"upper_message_id,omitempty"`
+}
+
+type UploadImageResponse struct {
+ Code int `json:"code"`
+ Message string `json:"message"`
+ Data *UploadImageResponseBody `json:"data,omitempty"`
+}
+
+type UploadImageResponseBody struct {
+ ImageKey string `json:"image_key"`
+}
diff --git a/pkg/utils/log/log.go b/pkg/utils/log/log.go
new file mode 100644
index 0000000..f9ff5a9
--- /dev/null
+++ b/pkg/utils/log/log.go
@@ -0,0 +1,99 @@
+package log
+
+import (
+ "github.com/sirupsen/logrus"
+)
+
+var (
+ debugLog = &CliLoggerFormatter{showType: "debug"}
+ infoLog = &CliLoggerFormatter{showType: "info"}
+ warnLog = &CliLoggerFormatter{showType: "warn"}
+ errorLog = &CliLoggerFormatter{showType: "error"}
+ fatalLog = &CliLoggerFormatter{showType: "fatal"}
+ successLog = &CliLoggerFormatter{showType: "success"}
+ separatorLog = &SeparatorFormatter{}
+)
+
+// Debugf log info with color,symbol and format for a notice
+func Debugf(format string, args ...interface{}) {
+ logrus.SetFormatter(debugLog)
+ logrus.Debugf(format, args...)
+}
+
+// Debug log info with color and symbol, for a notice
+func Debug(args ...interface{}) {
+ logrus.SetFormatter(debugLog)
+ logrus.Debug(args...)
+}
+
+// Infof log info with color,symbol and format for a notice
+func Infof(format string, args ...interface{}) {
+ logrus.SetFormatter(infoLog)
+ logrus.Infof(format, args...)
+}
+
+// Info log info with color and symbol, for a notice
+func Info(args ...interface{}) {
+ logrus.SetFormatter(infoLog)
+ logrus.Info(args...)
+}
+
+// Warnf log warn with color,symbol and format for a warning event
+func Warnf(format string, args ...interface{}) {
+ logrus.SetFormatter(warnLog)
+ logrus.Warnf(format, args...)
+}
+
+// Warn log warn with color and symbol, for a warning event
+func Warn(args ...interface{}) {
+ logrus.SetFormatter(warnLog)
+ logrus.Warn(args...)
+}
+
+// Errorf log error with color,symbol and format for a warning event
+func Errorf(format string, args ...interface{}) {
+ logrus.SetFormatter(errorLog)
+ logrus.Errorf(format, args...)
+}
+
+// Error log error with color adn symbol for a warning event
+func Error(args ...interface{}) {
+ logrus.SetFormatter(errorLog)
+ logrus.Error(args...)
+}
+
+// Fatalf log fatal with color,symbol and format for a fatal event
+func Fatalf(format string, args ...interface{}) {
+ logrus.SetFormatter(fatalLog)
+ logrus.Fatalf(format, args...)
+}
+
+// Fatal log fatal with color and symbol for a fatal event
+func Fatal(args ...interface{}) {
+ logrus.SetFormatter(fatalLog)
+ logrus.Fatal(args...)
+}
+
+// Successf log success with color,symbol and format for a success operation
+func Successf(format string, args ...interface{}) {
+ logrus.SetFormatter(successLog)
+ logrus.Infof(format, args...)
+}
+
+// Success log success with color and symbol, for a success operation
+func Success(args ...interface{}) {
+ logrus.SetFormatter(successLog)
+ logrus.Info(args...)
+}
+
+// Separatorf prints a line for separating as green color
+func Separatorf(format string, args ...interface{}) {
+ logrus.SetFormatter(separatorLog)
+ logrus.Infof(format, args...)
+}
+
+// Separator prints a line for separating as green color
+func Separator(args ...interface{}) {
+ logrus.SetFormatter(separatorLog)
+ logrus.Info(args...)
+}
diff --git a/pkg/utils/log/log_test.go b/pkg/utils/log/log_test.go
new file mode 100644
index 0000000..a5ed2c8
--- /dev/null
+++ b/pkg/utils/log/log_test.go
@@ -0,0 +1,18 @@
+package log
+
+import (
+ "testing"
+)
+
+func TestLog(t *testing.T) {
+ Debug("nice to meet you ", "log")
+ Info("nice to meet you ", "log")
+ Warn("nice to meet you ", "log")
+ Success("nice to meet you ", "log")
+
+ Debugf("nice to meet you %s", "log")
+ Infof("nice to meet you %s", "log")
+ Warnf("nice to meet you %s", "log")
+ Successf("nice to meet you %s", "log")
+
+}
diff --git a/pkg/utils/log/logwrapper.go b/pkg/utils/log/logwrapper.go
new file mode 100644
index 0000000..1ecab27
--- /dev/null
+++ b/pkg/utils/log/logwrapper.go
@@ -0,0 +1,121 @@
+package log
+
+import (
+ "bytes"
+ "fmt"
+ "runtime"
+
+ "github.com/sirupsen/logrus"
+ "gopkg.in/gookit/color.v1"
+)
+
+const (
+ DEBUG = "[DEBUG] "
+ WARN = "[WARN] "
+ INFO = "[INFO] "
+ SUCCESS = "[SUCCESS] "
+ ERROR = "[ERROR] "
+ FATAL = "[FATAL] "
+)
+
+// ROOTCALLER should be main proc
+const ROOTCALLER = "main.main"
+
+// REMOVELEVEL logrus stack level is 9, should be removed from stack trace
+const REMOVELEVEL = 10
+
+type CliLoggerFormatter struct {
+ level logrus.Level
+ showType string
+ formatLevelName string
+ prefix string
+}
+
+// Format implement Format interface to output custom log
+func (m *CliLoggerFormatter) Format(entry *logrus.Entry) ([]byte, error) {
+ var b *bytes.Buffer
+ if entry.Buffer != nil {
+ b = entry.Buffer
+ } else {
+ b = &bytes.Buffer{}
+ }
+
+ m.levelPrintRender()
+
+ timestamp := entry.Time.Format("2006-01-02 15:04:05")
+
+ if m.level == logrus.ErrorLevel && logrus.GetLevel() == logrus.DebugLevel {
+ entry.Message = addCallStackIgnoreLogrus(entry.Message)
+ }
+
+ newLog := fmt.Sprintf("%s %s %s %s\n", timestamp, m.prefix, m.formatLevelName, entry.Message)
+
+ b.WriteString(newLog)
+ return b.Bytes(), nil
+}
+
+// levelPrintRender render symbo and level according to type
+func (m *CliLoggerFormatter) levelPrintRender() {
+ switch m.showType {
+ case "debug":
+ m.level = logrus.DebugLevel
+ m.formatLevelName = color.Blue.Render(DEBUG)
+ m.prefix = color.Blue.Render(normal.Debug)
+ case "info":
+ m.level = logrus.InfoLevel
+ m.formatLevelName = color.FgLightBlue.Render(INFO)
+ m.prefix = color.FgLightBlue.Render(normal.Info)
+ case "warn":
+ m.level = logrus.WarnLevel
+ m.formatLevelName = color.Yellow.Render(WARN)
+ m.prefix = color.Yellow.Render(normal.Warn)
+ case "error":
+ m.level = logrus.ErrorLevel
+ m.formatLevelName = color.BgRed.Render(ERROR)
+ m.prefix = color.Red.Render(normal.Error)
+ case "fatal":
+ m.level = logrus.InfoLevel
+ m.formatLevelName = color.BgRed.Render(FATAL)
+ m.prefix = color.Red.Render(normal.Fatal)
+ case "success":
+ m.level = logrus.InfoLevel
+ m.formatLevelName = color.Green.Render(SUCCESS)
+ m.prefix = color.Green.Render(normal.Success)
+ }
+}
+
+type SeparatorFormatter struct{}
+
+// Format implement Format interface to output custom log
+func (s *SeparatorFormatter) Format(entry *logrus.Entry) ([]byte, error) {
+ var b *bytes.Buffer
+ if entry.Buffer != nil {
+ b = entry.Buffer
+ } else {
+ b = &bytes.Buffer{}
+ }
+
+ timestamp := entry.Time.Format("2006-01-02 15:04:05")
+ newLog := fmt.Sprintf("%s %s %s %s\n",
+ timestamp,
+ color.Blue.Render(normal.Info),
+ color.Blue.Render(INFO),
+ color.Blue.Render(fmt.Sprintf("%s %s %s", "-------------------- [ ", entry.Message, " ] --------------------")))
+
+ b.WriteString(newLog)
+ return b.Bytes(), nil
+}
+
+// addCallStackIgnoreLogrus add call stack to log message without logrus stack
+func addCallStackIgnoreLogrus(rawMessage string) string {
+ stackMessage := rawMessage
+ for i := REMOVELEVEL; ; i++ {
+ pc, file, line, _ := runtime.Caller(i)
+ stackMessage = stackMessage + "\n -- " + file + fmt.Sprintf(" %d", line)
+ entrance := runtime.FuncForPC(pc).Name()
+ if entrance == ROOTCALLER || entrance == "" {
+ break
+ }
+ }
+ return stackMessage
+}
diff --git a/pkg/utils/log/symbol.go b/pkg/utils/log/symbol.go
new file mode 100644
index 0000000..10c08ec
--- /dev/null
+++ b/pkg/utils/log/symbol.go
@@ -0,0 +1,33 @@
+package log
+
+import (
+ "fmt"
+)
+
+type Symbol string
+
+// Symbols struct contains all symbols
+type Symbols struct {
+ Debug Symbol
+ Info Symbol
+ Warning Symbol
+ Warn Symbol
+ Error Symbol
+ Fatal Symbol
+ Success Symbol
+}
+
+var normal = Symbols{
+ Debug: Symbol("ℹ"),
+ Info: Symbol("ℹ"),
+ Success: Symbol("✔"),
+ Warning: Symbol("⚠"),
+ Warn: Symbol("⚠"),
+ Error: Symbol("✖"),
+ Fatal: Symbol("✖"),
+}
+
+// String returns a printable representation of Symbols struct
+func (s Symbols) String() string {
+ return fmt.Sprintf("Info: %s Success: %s Warning: %s Error: %s", s.Info, s.Success, s.Warning, s.Error)
+}