Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d228b48c40 | |||
| 869ac76ba8 | |||
| ebe6b8d143 | |||
| c271d4f1c6 | |||
| 067e3f1d7a | |||
| 0f4713c1d1 | |||
| f053ac6ee1 | |||
| 65f5d60701 | |||
| 295aa6531f | |||
| a1e2052ae0 | |||
| d70f617c2d | |||
| 4ee4acfa25 | |||
| 8856cf3151 | |||
| 739eddd0c9 | |||
| acf48b9638 | |||
| 01a1302e02 | |||
| d9474f43ee | |||
| 4c7b9ae07d | |||
| bad16bfcd0 | |||
| 66059be93b | |||
| 175959ef60 | |||
| 399cac5122 | |||
| a1051fd871 | |||
| ac198c9e6a | |||
| e157e8e469 | |||
| b2ca22db96 | |||
| 57ccf4fc30 | |||
| 1b9fe11c1f |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- 1.11.2
|
- 1.12.1
|
||||||
- tip
|
- tip
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Library webhooks
|
Library webhooks
|
||||||
================
|
================
|
||||||
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v5/logo.png">
|
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v5/logo.png">
|
||||||
[](https://travis-ci.org/go-playground/webhooks)
|
[](https://travis-ci.org/go-playground/webhooks)
|
||||||
[](https://coveralls.io/github/go-playground/webhooks?branch=v5)
|
[](https://coveralls.io/github/go-playground/webhooks?branch=v5)
|
||||||
[](https://goreportcard.com/report/go-playground/webhooks)
|
[](https://goreportcard.com/report/go-playground/webhooks)
|
||||||
|
|||||||
@@ -0,0 +1,218 @@
|
|||||||
|
package bitbucketserver
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/hmac"
|
||||||
|
"crypto/sha256"
|
||||||
|
"encoding/hex"
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"io/ioutil"
|
||||||
|
"net/http"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
ErrEventNotSpecifiedToParse = errors.New("no Event specified to parse")
|
||||||
|
ErrInvalidHTTPMethod = errors.New("invalid HTTP Method")
|
||||||
|
ErrMissingEventKeyHeader = errors.New("missing X-Event-Key Header")
|
||||||
|
ErrMissingHubSignatureHeader = errors.New("missing X-Hub-Signature Header")
|
||||||
|
ErrEventNotFound = errors.New("event not defined to be parsed")
|
||||||
|
ErrParsingPayload = errors.New("error parsing payload")
|
||||||
|
ErrHMACVerificationFailed = errors.New("HMAC verification failed")
|
||||||
|
)
|
||||||
|
|
||||||
|
type Event string
|
||||||
|
|
||||||
|
const (
|
||||||
|
RepositoryReferenceChangedEvent Event = "repo:refs_changed"
|
||||||
|
RepositoryModifiedEvent Event = "repo:modified"
|
||||||
|
RepositoryForkedEvent Event = "repo:forked"
|
||||||
|
RepositoryCommentAddedEvent Event = "repo:comment:added"
|
||||||
|
RepositoryCommentEditedEvent Event = "repo:comment:edited"
|
||||||
|
RepositoryCommentDeletedEvent Event = "repo:comment:deleted"
|
||||||
|
|
||||||
|
PullRequestOpenedEvent Event = "pr:opened"
|
||||||
|
PullRequestModifiedEvent Event = "pr:modified"
|
||||||
|
PullRequestMergedEvent Event = "pr:merged"
|
||||||
|
PullRequestDeclinedEvent Event = "pr:declined"
|
||||||
|
PullRequestDeletedEvent Event = "pr:deleted"
|
||||||
|
|
||||||
|
PullRequestReviewerUpdatedEvent Event = "pr:reviewer:updated"
|
||||||
|
PullRequestReviewerApprovedEvent Event = "pr:reviewer:approved"
|
||||||
|
PullRequestReviewerUnapprovedEvent Event = "pr:reviewer:unapproved"
|
||||||
|
PullRequestReviewerNeedsWorkEvent Event = "pr:reviewer:needs_work"
|
||||||
|
|
||||||
|
PullRequestCommentAddedEvent Event = "pr:comment:added"
|
||||||
|
PullRequestCommentEditedEvent Event = "pr:comment:edited"
|
||||||
|
PullRequestCommentDeletedEvent Event = "pr:comment:deleted"
|
||||||
|
|
||||||
|
DiagnosticsPingEvent Event = "diagnostics:ping"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Option is a configuration option for the webhook
|
||||||
|
type Option func(*Webhook) error
|
||||||
|
|
||||||
|
// Options is a namespace var for configuration options
|
||||||
|
var Options = WebhookOptions{}
|
||||||
|
|
||||||
|
// WebhookOptions is a namespace for configuration option methods
|
||||||
|
type WebhookOptions struct{}
|
||||||
|
|
||||||
|
// Secret registers the GitHub secret
|
||||||
|
func (WebhookOptions) Secret(secret string) Option {
|
||||||
|
return func(hook *Webhook) error {
|
||||||
|
hook.secret = secret
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Webhook instance contains all methods needed to process events
|
||||||
|
type Webhook struct {
|
||||||
|
secret string
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates and returns a WebHook instance denoted by the Provider type
|
||||||
|
func New(options ...Option) (*Webhook, error) {
|
||||||
|
hook := new(Webhook)
|
||||||
|
for _, opt := range options {
|
||||||
|
if err := opt(hook); err != nil {
|
||||||
|
return nil, errors.New("Error applying Option")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return hook, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (hook *Webhook) Parse(r *http.Request, events ...Event) (interface{}, error) {
|
||||||
|
defer func() {
|
||||||
|
_, _ = io.Copy(ioutil.Discard, r.Body)
|
||||||
|
_ = r.Body.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
|
if len(events) == 0 {
|
||||||
|
return nil, ErrEventNotSpecifiedToParse
|
||||||
|
}
|
||||||
|
|
||||||
|
if r.Method != http.MethodPost {
|
||||||
|
return nil, ErrInvalidHTTPMethod
|
||||||
|
}
|
||||||
|
|
||||||
|
event := r.Header.Get("X-Event-Key")
|
||||||
|
if event == "" {
|
||||||
|
return nil, ErrMissingEventKeyHeader
|
||||||
|
}
|
||||||
|
|
||||||
|
bitbucketEvent := Event(event)
|
||||||
|
|
||||||
|
var found bool
|
||||||
|
for _, evt := range events {
|
||||||
|
if evt == bitbucketEvent {
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// event not defined to be parsed
|
||||||
|
if !found {
|
||||||
|
return nil, ErrEventNotFound
|
||||||
|
}
|
||||||
|
|
||||||
|
if bitbucketEvent == DiagnosticsPingEvent {
|
||||||
|
return DiagnosticsPingPayload{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
payload, err := ioutil.ReadAll(r.Body)
|
||||||
|
if err != nil || len(payload) == 0 {
|
||||||
|
return nil, ErrParsingPayload
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(hook.secret) > 0 {
|
||||||
|
signature := r.Header.Get("X-Hub-Signature")
|
||||||
|
if len(signature) == 0 {
|
||||||
|
return nil, ErrMissingHubSignatureHeader
|
||||||
|
}
|
||||||
|
mac := hmac.New(sha256.New, []byte(hook.secret))
|
||||||
|
_, _ = mac.Write(payload)
|
||||||
|
expectedMAC := hex.EncodeToString(mac.Sum(nil))
|
||||||
|
|
||||||
|
if !hmac.Equal([]byte(signature[7:]), []byte(expectedMAC)) {
|
||||||
|
return nil, ErrHMACVerificationFailed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch bitbucketEvent {
|
||||||
|
case RepositoryReferenceChangedEvent:
|
||||||
|
var pl RepositoryReferenceChangedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case RepositoryModifiedEvent:
|
||||||
|
var pl RepositoryModifiedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case RepositoryForkedEvent:
|
||||||
|
var pl RepositoryForkedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case RepositoryCommentAddedEvent:
|
||||||
|
var pl RepositoryCommentAddedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case RepositoryCommentEditedEvent:
|
||||||
|
var pl RepositoryCommentEditedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case RepositoryCommentDeletedEvent:
|
||||||
|
var pl RepositoryCommentDeletedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestOpenedEvent:
|
||||||
|
var pl PullRequestOpenedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestModifiedEvent:
|
||||||
|
var pl PullRequestModifiedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestMergedEvent:
|
||||||
|
var pl PullRequestMergedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestDeclinedEvent:
|
||||||
|
var pl PullRequestDeclinedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestDeletedEvent:
|
||||||
|
var pl PullRequestDeletedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestReviewerUpdatedEvent:
|
||||||
|
var pl PullRequestReviewerUpdatedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestReviewerApprovedEvent:
|
||||||
|
var pl PullRequestReviewerApprovedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestReviewerUnapprovedEvent:
|
||||||
|
var pl PullRequestReviewerUnapprovedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestReviewerNeedsWorkEvent:
|
||||||
|
var pl PullRequestReviewerNeedsWorkPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestCommentAddedEvent:
|
||||||
|
var pl PullRequestCommentAddedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestCommentEditedEvent:
|
||||||
|
var pl PullRequestCommentEditedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case PullRequestCommentDeletedEvent:
|
||||||
|
var pl PullRequestCommentDeletedPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("unknown event %s", bitbucketEvent)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,319 @@
|
|||||||
|
package bitbucketserver
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"io"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
"net/http/httptest"
|
||||||
|
"os"
|
||||||
|
"reflect"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
path = "/webhooks"
|
||||||
|
)
|
||||||
|
|
||||||
|
var hook *Webhook
|
||||||
|
|
||||||
|
func TestMain(m *testing.M) {
|
||||||
|
// setup
|
||||||
|
var err error
|
||||||
|
hook, err = New(Options.Secret("secret"))
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
os.Exit(m.Run())
|
||||||
|
// teardown
|
||||||
|
}
|
||||||
|
|
||||||
|
func newServer(handler http.HandlerFunc) *httptest.Server {
|
||||||
|
mux := http.NewServeMux()
|
||||||
|
mux.HandleFunc(path, handler)
|
||||||
|
return httptest.NewServer(mux)
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBadRequests(t *testing.T) {
|
||||||
|
assert := require.New(t)
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
event Event
|
||||||
|
payload io.Reader
|
||||||
|
headers http.Header
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "BadNoEventHeader",
|
||||||
|
event: RepositoryReferenceChangedEvent,
|
||||||
|
payload: bytes.NewBuffer([]byte("{}")),
|
||||||
|
headers: http.Header{},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "BadSignatureLength",
|
||||||
|
event: RepositoryReferenceChangedEvent,
|
||||||
|
payload: bytes.NewBuffer([]byte("{}")),
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"repo:refs_changed"},
|
||||||
|
"X-Hub-Signature": []string{""},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "BadSignatureMatch",
|
||||||
|
event: RepositoryReferenceChangedEvent,
|
||||||
|
payload: bytes.NewBuffer([]byte("{}")),
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"repo:refs_changed"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=111"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "UnsubscribedEvent",
|
||||||
|
event: RepositoryReferenceChangedEvent,
|
||||||
|
payload: bytes.NewBuffer([]byte("{}")),
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"nonexistent_event"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=111"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
tc := tt
|
||||||
|
client := &http.Client{}
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
var parseError error
|
||||||
|
server := newServer(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
_, parseError = hook.Parse(r, tc.event)
|
||||||
|
})
|
||||||
|
defer server.Close()
|
||||||
|
|
||||||
|
req, err := http.NewRequest(http.MethodPost, server.URL+path, tc.payload)
|
||||||
|
assert.NoError(err)
|
||||||
|
req.Header = tc.headers
|
||||||
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
|
||||||
|
resp, err := client.Do(req)
|
||||||
|
|
||||||
|
assert.NoError(err)
|
||||||
|
assert.Equal(http.StatusOK, resp.StatusCode)
|
||||||
|
assert.Error(parseError)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestWebhooks(t *testing.T) {
|
||||||
|
assert := require.New(t)
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
event Event
|
||||||
|
payloadType interface{}
|
||||||
|
filename string
|
||||||
|
headers http.Header
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "Repository refs updated",
|
||||||
|
event: RepositoryReferenceChangedEvent,
|
||||||
|
payloadType: RepositoryReferenceChangedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/repo-refs-changed.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"repo:refs_changed"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=8a60f7487d167f55886df87d4077192035d76f76a8e0b3a48fd8ae8cad25f391"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Repository modified",
|
||||||
|
event: RepositoryModifiedEvent,
|
||||||
|
payloadType: RepositoryModifiedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/repo-modified.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"repo:modified"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=1511ed69d7697ede1699b0217e17b7d0b492eeccc9a5649d5d30dd84f0e5a89a"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Repository forked",
|
||||||
|
event: RepositoryForkedEvent,
|
||||||
|
payloadType: RepositoryForkedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/repo-forked.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"repo:forked"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=d34115023042f9e7ef7020200650e2f34da137e0217708475f9b749ad889a16d"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Repository commit comment edited",
|
||||||
|
event: RepositoryCommentEditedEvent,
|
||||||
|
payloadType: RepositoryCommentEditedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/repo-comment-edited.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"repo:comment:edited"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=90a8f4898d8dd7a4ef99e33a7f1d86dd3645f45b2a5b59110493cc4b3062a712"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Repository commit comment deleted",
|
||||||
|
event: RepositoryCommentDeletedEvent,
|
||||||
|
payloadType: RepositoryCommentDeletedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/repo-comment-deleted.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"repo:comment:deleted"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=e8b6d3d1581366c9f65949c93149b29ba33252f6afa807432f8f823fb08680e7"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Repository commit comment added",
|
||||||
|
event: RepositoryCommentAddedEvent,
|
||||||
|
payloadType: RepositoryCommentAddedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/repo-comment-added.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"repo:comment:added"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=80b121d53ec48bb3f8bed9243ba53be62c8eb7d1ce0395ca87fef1938bf9620e"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request unapproved",
|
||||||
|
event: PullRequestReviewerUnapprovedEvent,
|
||||||
|
payloadType: PullRequestReviewerUnapprovedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-reviewer-unapproved.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:reviewer:unapproved"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=9822024378738817dc85c0a41feb9fa4825058d28a9a1ee7065bfacd6a04c7c1"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request reviewer updated",
|
||||||
|
event: PullRequestReviewerUpdatedEvent,
|
||||||
|
payloadType: PullRequestReviewerUpdatedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-reviewer-updated.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:reviewer:updated"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=07ca94a0a5c5913819a16ce0414f976023aeb0065fa9d80f990aad7f1d936be5"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request opened",
|
||||||
|
event: PullRequestOpenedEvent,
|
||||||
|
payloadType: PullRequestOpenedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-opened.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:opened"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=b82c323978a741aa256c0a6bfa13a8f211e1795bd8ddb2641ced122769f7a7c6"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request modified",
|
||||||
|
event: PullRequestModifiedEvent,
|
||||||
|
payloadType: PullRequestModifiedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-modified.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:modified"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=1e307462390ff6f0c59fcdb8eb4b2977058b5cbc502a24a0db385f5331136227"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request merged",
|
||||||
|
event: PullRequestMergedEvent,
|
||||||
|
payloadType: PullRequestMergedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-merged.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:merged"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=adbee42ddd6a178b0c1160e89f666b53fb8c76495f782a4e3055e3fbee232704"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request marked needs work",
|
||||||
|
event: PullRequestReviewerNeedsWorkEvent,
|
||||||
|
payloadType: PullRequestReviewerNeedsWorkPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-reviewer-needs-work.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:reviewer:needs_work"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=3d10aadcede2131674654bb48c10fe904b0b2ed3d3b283bdc5c64dbc4856582d"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request deleted",
|
||||||
|
event: PullRequestDeletedEvent,
|
||||||
|
payloadType: PullRequestDeletedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-deleted.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:deleted"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=657c5d9839c0e3c1c95e5ceceacb07f0e372328883dab6e25bb619ee8b19a359"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request declined",
|
||||||
|
event: PullRequestDeclinedEvent,
|
||||||
|
payloadType: PullRequestDeclinedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-declined.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:declined"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=e323ab4d057f32475340d03c90aa9ec20cd3a96c15200d75e59f221c14053528"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request comment edited",
|
||||||
|
event: PullRequestCommentEditedEvent,
|
||||||
|
payloadType: PullRequestCommentEditedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-comment-edited.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:comment:edited"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=66580d1b02904e470cb48c1333452ea0748aecc3a9806f5a0f949be3a8b0a5ec"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request comment deleted",
|
||||||
|
event: PullRequestCommentDeletedEvent,
|
||||||
|
payloadType: PullRequestCommentDeletedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-comment-deleted.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:comment:deleted"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=7c9575a6e9b141e063ef34e5066ebe67c3a5b59241e633d1332d70aba468fd04"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pull request comment added",
|
||||||
|
event: PullRequestReviewerApprovedEvent,
|
||||||
|
payloadType: PullRequestReviewerApprovedPayload{},
|
||||||
|
filename: "../testdata/bitbucket-server/pr-reviewer-approved.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Event-Key": []string{"pr:reviewer:approved"},
|
||||||
|
"X-Hub-Signature": []string{"sha256=a8b78d774dea02f234069f724ee6c6a3c5c13fc3a3b856dac0a33d8ed9ec1823"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
tc := tt
|
||||||
|
client := &http.Client{}
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
payload, err := os.Open(tc.filename)
|
||||||
|
assert.NoError(err)
|
||||||
|
defer func() {
|
||||||
|
_ = payload.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
|
var parseError error
|
||||||
|
var results interface{}
|
||||||
|
|
||||||
|
server := newServer(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
results, parseError = hook.Parse(r, tc.event)
|
||||||
|
})
|
||||||
|
defer server.Close()
|
||||||
|
|
||||||
|
req, err := http.NewRequest(http.MethodPost, server.URL+path, payload)
|
||||||
|
assert.NoError(err)
|
||||||
|
req.Header = tc.headers
|
||||||
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
|
||||||
|
resp, err := client.Do(req)
|
||||||
|
assert.NoError(err)
|
||||||
|
assert.Equal(http.StatusOK, resp.StatusCode)
|
||||||
|
assert.NoError(parseError)
|
||||||
|
assert.Equal(reflect.TypeOf(tc.payloadType), reflect.TypeOf(results))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,273 @@
|
|||||||
|
package bitbucketserver
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type DiagnosticsPingPayload struct{}
|
||||||
|
|
||||||
|
type RepositoryReferenceChangedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
Changes []RepositoryChange `json:"changes"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RepositoryModifiedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
Old Repository `json:"old"`
|
||||||
|
New Repository `json:"new"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RepositoryForkedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RepositoryCommentAddedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
Commit string `json:"commit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RepositoryCommentEditedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
PreviousComment string `json:"previousComment"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
Commit string `json:"commit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RepositoryCommentDeletedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
Commit string `json:"commit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestOpenedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestModifiedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
PreviousTitle string `json:"previousTitle"`
|
||||||
|
PreviousDescription string `json:"previousDescription"`
|
||||||
|
PreviousTarget map[string]interface{} `json:"previousTarget"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestMergedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestDeclinedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestDeletedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestReviewerUpdatedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
RemovedReviewers []User `json:"removedReviewers"`
|
||||||
|
AddedReviewers []User `json:"addedReviewers"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestReviewerApprovedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
Participant PullRequestParticipant `json:"participant"`
|
||||||
|
PreviousStatus string `json:"previousStatus"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestReviewerUnapprovedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
Participant PullRequestParticipant `json:"participant"`
|
||||||
|
PreviousStatus string `json:"previousStatus"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestReviewerNeedsWorkPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
Participant PullRequestParticipant `json:"participant"`
|
||||||
|
PreviousStatus string `json:"previousStatus"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestCommentAddedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
CommentParentId uint64 `json:"commentParentId,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestCommentEditedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
CommentParentId string `json:"commentParentId,omitempty"`
|
||||||
|
PreviousComment string `json:"previousComment"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestCommentDeletedPayload struct {
|
||||||
|
Date Date `json:"date"`
|
||||||
|
EventKey Event `json:"eventKey"`
|
||||||
|
Actor User `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullRequest"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
CommentParentId uint64 `json:"commentParentId,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------
|
||||||
|
|
||||||
|
type User struct {
|
||||||
|
ID uint64 `json:"id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
EmailAddress string `json:"emailAddress"`
|
||||||
|
DisplayName string `json:"displayName"`
|
||||||
|
Active bool `json:"active"`
|
||||||
|
Slug string `json:"slug"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
Links map[string]interface{} `json:"links"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Repository struct {
|
||||||
|
ID uint64 `json:"id"`
|
||||||
|
Slug string `json:"slug"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
ScmId string `json:"scmId"`
|
||||||
|
State string `json:"state"`
|
||||||
|
StatusMessage string `json:"statusMessage"`
|
||||||
|
Forkable bool `json:"forkable"`
|
||||||
|
Origin *Repository `json:"origin,omitempty"`
|
||||||
|
Project Project `json:"project"`
|
||||||
|
Public bool `json:"public"`
|
||||||
|
Links map[string]interface{} `json:"links"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Project struct {
|
||||||
|
ID uint64 `json:"id"`
|
||||||
|
Key string `json:"key"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
Public *bool `json:"public,omitempty"`
|
||||||
|
Owner User `json:"owner"`
|
||||||
|
Links map[string]interface{} `json:"links"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequest struct {
|
||||||
|
ID uint64 `json:"id"`
|
||||||
|
Version uint64 `json:"version"`
|
||||||
|
Title string `json:"title"`
|
||||||
|
Description string `json:"description,omitempty"`
|
||||||
|
State string `json:"state"`
|
||||||
|
Open bool `json:"open"`
|
||||||
|
Closed bool `json:"closed"`
|
||||||
|
CreatedDate uint64 `json:"createdDate"`
|
||||||
|
UpdatedDate uint64 `json:"updatedDate,omitempty"`
|
||||||
|
ClosedDate uint64 `json:"closedDate,omitempty"`
|
||||||
|
FromRef RepositoryReference `json:"fromRef"`
|
||||||
|
ToRef RepositoryReference `json:"toRef"`
|
||||||
|
Locked bool `json:"locked"`
|
||||||
|
Author PullRequestParticipant `json:"author"`
|
||||||
|
Reviewers []PullRequestParticipant `json:"reviewers"`
|
||||||
|
Participants []PullRequestParticipant `json:"participants"`
|
||||||
|
Properties map[string]interface{} `json:"properties,omitempty"`
|
||||||
|
Links map[string]interface{} `json:"links"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RepositoryChange struct {
|
||||||
|
Reference RepositoryReference `json:"ref"`
|
||||||
|
ReferenceId string `json:"refId"`
|
||||||
|
FromHash string `json:"fromHash"`
|
||||||
|
ToHash string `json:"toHash"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RepositoryReference struct {
|
||||||
|
ID string `json:"id"`
|
||||||
|
DisplayId string `json:"displayId"`
|
||||||
|
Type string `json:"type,omitempty"`
|
||||||
|
LatestCommit string `json:"latestCommit,omitempty"`
|
||||||
|
Repository Repository `json:"repository,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Comment struct {
|
||||||
|
ID uint64 `json:"id"`
|
||||||
|
Properties map[string]interface{} `json:"properties,omitempty"`
|
||||||
|
Version uint64 `json:"version"`
|
||||||
|
Text string `json:"text"`
|
||||||
|
Author User `json:"author"`
|
||||||
|
CreatedDate uint64 `json:"createdDate"`
|
||||||
|
UpdatedDate uint64 `json:"updatedDate"`
|
||||||
|
Comments []map[string]interface{} `json:"comments"`
|
||||||
|
Tasks []map[string]interface{} `json:"tasks"`
|
||||||
|
PermittedOperations map[string]interface{} `json:"permittedOperations,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type PullRequestParticipant struct {
|
||||||
|
User User `json:"user"`
|
||||||
|
LastReviewedCommit string `json:"lastReviewedCommit,omitempty"`
|
||||||
|
Role string `json:"role"`
|
||||||
|
Approved bool `json:"approved"`
|
||||||
|
Status string `json:"status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Date time.Time
|
||||||
|
|
||||||
|
func (b *Date) UnmarshalJSON(p []byte) error {
|
||||||
|
t, err := time.Parse("2006-01-02T15:04:05Z0700", strings.Replace(string(p), "\"", "", -1))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
*b = Date(t)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (b Date) MarshalJSON() ([]byte, error) {
|
||||||
|
stamp := fmt.Sprintf("\"%s\"", time.Time(b).Format("2006-01-02T15:04:05Z0700"))
|
||||||
|
return []byte(stamp), nil
|
||||||
|
}
|
||||||
@@ -28,6 +28,8 @@ type Event string
|
|||||||
|
|
||||||
// GitHub hook types
|
// GitHub hook types
|
||||||
const (
|
const (
|
||||||
|
CheckRunEvent Event = "check_run"
|
||||||
|
CheckSuiteEvent Event = "check_suite"
|
||||||
CommitCommentEvent Event = "commit_comment"
|
CommitCommentEvent Event = "commit_comment"
|
||||||
CreateEvent Event = "create"
|
CreateEvent Event = "create"
|
||||||
DeleteEvent Event = "delete"
|
DeleteEvent Event = "delete"
|
||||||
@@ -58,6 +60,7 @@ const (
|
|||||||
PushEvent Event = "push"
|
PushEvent Event = "push"
|
||||||
ReleaseEvent Event = "release"
|
ReleaseEvent Event = "release"
|
||||||
RepositoryEvent Event = "repository"
|
RepositoryEvent Event = "repository"
|
||||||
|
SecurityAdvisoryEvent Event = "security_advisory"
|
||||||
StatusEvent Event = "status"
|
StatusEvent Event = "status"
|
||||||
TeamEvent Event = "team"
|
TeamEvent Event = "team"
|
||||||
TeamAddEvent Event = "team_add"
|
TeamAddEvent Event = "team_add"
|
||||||
@@ -162,6 +165,14 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch gitHubEvent {
|
switch gitHubEvent {
|
||||||
|
case CheckRunEvent:
|
||||||
|
var pl CheckRunPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
|
case CheckSuiteEvent:
|
||||||
|
var pl CheckSuitePayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
case CommitCommentEvent:
|
case CommitCommentEvent:
|
||||||
var pl CommitCommentPayload
|
var pl CommitCommentPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
@@ -278,6 +289,10 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
|
|||||||
var pl RepositoryPayload
|
var pl RepositoryPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
case SecurityAdvisoryEvent:
|
||||||
|
var pl SecurityAdvisoryPayload
|
||||||
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
return pl, err
|
||||||
case StatusEvent:
|
case StatusEvent:
|
||||||
var pl StatusPayload
|
var pl StatusPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err = json.Unmarshal([]byte(payload), &pl)
|
||||||
|
|||||||
@@ -133,6 +133,26 @@ func TestWebhooks(t *testing.T) {
|
|||||||
filename string
|
filename string
|
||||||
headers http.Header
|
headers http.Header
|
||||||
}{
|
}{
|
||||||
|
{
|
||||||
|
name: "CheckRunEvent",
|
||||||
|
event: CheckRunEvent,
|
||||||
|
typ: CheckRunPayload{},
|
||||||
|
filename: "../testdata/github/check-run.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Github-Event": []string{"check_run"},
|
||||||
|
"X-Hub-Signature": []string{"sha1=229f4920493b455398168cd86dc6b366064bdf3f"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "CheckSuiteEvent",
|
||||||
|
event: CheckSuiteEvent,
|
||||||
|
typ: CheckSuitePayload{},
|
||||||
|
filename: "../testdata/github/check-suite.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Github-Event": []string{"check_suite"},
|
||||||
|
"X-Hub-Signature": []string{"sha1=250ad5a340f8d91e67dc5682342f3190fd2006a1"},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "CommitCommentEvent",
|
name: "CommitCommentEvent",
|
||||||
event: CommitCommentEvent,
|
event: CommitCommentEvent,
|
||||||
@@ -433,6 +453,16 @@ func TestWebhooks(t *testing.T) {
|
|||||||
"X-Hub-Signature": []string{"sha1=df442a8af41edd2d42ccdd997938d1d111b0f94e"},
|
"X-Hub-Signature": []string{"sha1=df442a8af41edd2d42ccdd997938d1d111b0f94e"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "SecurityAdvisoryEvent",
|
||||||
|
event: SecurityAdvisoryEvent,
|
||||||
|
typ: SecurityAdvisoryPayload{},
|
||||||
|
filename: "../testdata/github/security-advisory.json",
|
||||||
|
headers: http.Header{
|
||||||
|
"X-Github-Event": []string{"security_advisory"},
|
||||||
|
"X-Hub-Signature": []string{"sha1=6a71f24fa69f55469843a91dc3a5c3e29714a565"},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "StatusEvent",
|
name: "StatusEvent",
|
||||||
event: StatusEvent,
|
event: StatusEvent,
|
||||||
|
|||||||
+530
-1
@@ -2,6 +2,373 @@ package github
|
|||||||
|
|
||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
|
// CheckRunPayload contains the information for GitHub's check_run hook event
|
||||||
|
type CheckRunPayload struct {
|
||||||
|
Action string `json:"action"`
|
||||||
|
CheckRun struct {
|
||||||
|
ID int64 `json:"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"`
|
||||||
|
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"`
|
||||||
|
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"`
|
||||||
|
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"`
|
||||||
|
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"`
|
||||||
|
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"`
|
||||||
|
Sender 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:"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"`
|
||||||
|
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"`
|
||||||
|
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"`
|
||||||
|
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"`
|
||||||
|
Sender 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:"sender"`
|
||||||
|
}
|
||||||
|
|
||||||
// CommitCommentPayload contains the information for GitHub's commit_comment hook event
|
// CommitCommentPayload contains the information for GitHub's commit_comment hook event
|
||||||
type CommitCommentPayload struct {
|
type CommitCommentPayload struct {
|
||||||
Action string `json:"action"`
|
Action string `json:"action"`
|
||||||
@@ -1493,6 +1860,7 @@ type IssuesPayload struct {
|
|||||||
SiteAdmin bool `json:"site_admin"`
|
SiteAdmin bool `json:"site_admin"`
|
||||||
} `json:"sender"`
|
} `json:"sender"`
|
||||||
Assignee *Assignee `json:"assignee"`
|
Assignee *Assignee `json:"assignee"`
|
||||||
|
Label *Label `json:"label"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LabelPayload contains the information for GitHub's label hook event
|
// LabelPayload contains the information for GitHub's label hook event
|
||||||
@@ -2262,6 +2630,112 @@ type PingPayload struct {
|
|||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
} `json:"hook"`
|
} `json:"hook"`
|
||||||
|
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"`
|
||||||
|
Sender 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:"sender"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProjectCardPayload contains the information for GitHub's project_payload hook event
|
// ProjectCardPayload contains the information for GitHub's project_payload hook event
|
||||||
@@ -3252,7 +3726,20 @@ type PullRequestPayload struct {
|
|||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
SiteAdmin bool `json:"site_admin"`
|
SiteAdmin bool `json:"site_admin"`
|
||||||
} `json:"sender"`
|
} `json:"sender"`
|
||||||
Assignee *Assignee `json:"assignee"`
|
Assignee *Assignee `json:"assignee"`
|
||||||
|
RequestedReviewer *Assignee `json:"requested_reviewer"`
|
||||||
|
RequestedTeam struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
ID int64 `json:"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 {
|
Installation struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
} `json:"installation"`
|
} `json:"installation"`
|
||||||
@@ -3748,6 +4235,7 @@ type PullRequestReviewCommentPayload struct {
|
|||||||
Href string `json:"href"`
|
Href string `json:"href"`
|
||||||
} `json:"pull_request"`
|
} `json:"pull_request"`
|
||||||
} `json:"_links"`
|
} `json:"_links"`
|
||||||
|
InReplyToID int64 `json:"in_reply_to_id"`
|
||||||
} `json:"comment"`
|
} `json:"comment"`
|
||||||
PullRequest struct {
|
PullRequest struct {
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
@@ -4589,6 +5077,38 @@ type RepositoryPayload struct {
|
|||||||
} `json:"sender"`
|
} `json:"sender"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
// StatusPayload contains the information for GitHub's status hook event
|
||||||
type StatusPayload struct {
|
type StatusPayload struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
@@ -5187,3 +5707,12 @@ type Parent struct {
|
|||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
Sha string `json:"sha"`
|
Sha string `json:"sha"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Label contains Issue's Label information
|
||||||
|
type Label struct {
|
||||||
|
ID int64 `json:"id"`
|
||||||
|
URL string `json:"url"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Color string `json:"color"`
|
||||||
|
Default bool `json:"default"`
|
||||||
|
}
|
||||||
|
|||||||
+51
-23
@@ -17,6 +17,7 @@ var (
|
|||||||
ErrGitLabTokenVerificationFailed = errors.New("X-Gitlab-Token validation failed")
|
ErrGitLabTokenVerificationFailed = errors.New("X-Gitlab-Token validation failed")
|
||||||
ErrEventNotFound = errors.New("event not defined to be parsed")
|
ErrEventNotFound = errors.New("event not defined to be parsed")
|
||||||
ErrParsingPayload = errors.New("error parsing payload")
|
ErrParsingPayload = errors.New("error parsing payload")
|
||||||
|
ErrParsingSystemPayload = errors.New("error parsing system payload")
|
||||||
// ErrHMACVerificationFailed = errors.New("HMAC verification failed")
|
// ErrHMACVerificationFailed = errors.New("HMAC verification failed")
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -31,6 +32,11 @@ const (
|
|||||||
WikiPageEvents Event = "Wiki Page Hook"
|
WikiPageEvents Event = "Wiki Page Hook"
|
||||||
PipelineEvents Event = "Pipeline Hook"
|
PipelineEvents Event = "Pipeline Hook"
|
||||||
BuildEvents Event = "Build Hook"
|
BuildEvents Event = "Build Hook"
|
||||||
|
SystemHookEvents Event = "System Hook"
|
||||||
|
|
||||||
|
objectPush string = "push"
|
||||||
|
objectTag string = "tag_push"
|
||||||
|
objectMergeRequest string = "merge_request"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Option is a configuration option for the webhook
|
// Option is a configuration option for the webhook
|
||||||
@@ -55,7 +61,7 @@ type Webhook struct {
|
|||||||
secret string
|
secret string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Event defines a GitHub hook event type
|
// Event defines a GitLab hook event type by the X-Gitlab-Event Header
|
||||||
type Event string
|
type Event string
|
||||||
|
|
||||||
// New creates and returns a WebHook instance denoted by the Provider type
|
// New creates and returns a WebHook instance denoted by the Provider type
|
||||||
@@ -83,6 +89,14 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
|
|||||||
return nil, ErrInvalidHTTPMethod
|
return nil, ErrInvalidHTTPMethod
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we have a Secret set, we should check the MAC
|
||||||
|
if len(hook.secret) > 0 {
|
||||||
|
signature := r.Header.Get("X-Gitlab-Token")
|
||||||
|
if signature != hook.secret {
|
||||||
|
return nil, ErrGitLabTokenVerificationFailed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
event := r.Header.Get("X-Gitlab-Event")
|
event := r.Header.Get("X-Gitlab-Event")
|
||||||
if len(event) == 0 {
|
if len(event) == 0 {
|
||||||
return nil, ErrMissingGitLabEventHeader
|
return nil, ErrMissingGitLabEventHeader
|
||||||
@@ -90,6 +104,16 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
|
|||||||
|
|
||||||
gitLabEvent := Event(event)
|
gitLabEvent := Event(event)
|
||||||
|
|
||||||
|
payload, err := ioutil.ReadAll(r.Body)
|
||||||
|
if err != nil || len(payload) == 0 {
|
||||||
|
return nil, ErrParsingPayload
|
||||||
|
}
|
||||||
|
|
||||||
|
return eventParsing(gitLabEvent, events, payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
func eventParsing(gitLabEvent Event, events []Event, payload []byte) (interface{}, error) {
|
||||||
|
|
||||||
var found bool
|
var found bool
|
||||||
for _, evt := range events {
|
for _, evt := range events {
|
||||||
if evt == gitLabEvent {
|
if evt == gitLabEvent {
|
||||||
@@ -102,64 +126,68 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
|
|||||||
return nil, ErrEventNotFound
|
return nil, ErrEventNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
payload, err := ioutil.ReadAll(r.Body)
|
|
||||||
if err != nil || len(payload) == 0 {
|
|
||||||
return nil, ErrParsingPayload
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we have a Secret set, we should check the MAC
|
|
||||||
if len(hook.secret) > 0 {
|
|
||||||
signature := r.Header.Get("X-Gitlab-Token")
|
|
||||||
if signature != hook.secret {
|
|
||||||
return nil, ErrGitLabTokenVerificationFailed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch gitLabEvent {
|
switch gitLabEvent {
|
||||||
case PushEvents:
|
case PushEvents:
|
||||||
var pl PushEventPayload
|
var pl PushEventPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
|
||||||
case TagEvents:
|
case TagEvents:
|
||||||
var pl TagEventPayload
|
var pl TagEventPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
|
||||||
case ConfidentialIssuesEvents:
|
case ConfidentialIssuesEvents:
|
||||||
var pl ConfidentialIssueEventPayload
|
var pl ConfidentialIssueEventPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
|
||||||
case IssuesEvents:
|
case IssuesEvents:
|
||||||
var pl IssueEventPayload
|
var pl IssueEventPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
|
||||||
case CommentEvents:
|
case CommentEvents:
|
||||||
var pl CommentEventPayload
|
var pl CommentEventPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
|
||||||
case MergeRequestEvents:
|
case MergeRequestEvents:
|
||||||
var pl MergeRequestEventPayload
|
var pl MergeRequestEventPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
|
||||||
case WikiPageEvents:
|
case WikiPageEvents:
|
||||||
var pl WikiPageEventPayload
|
var pl WikiPageEventPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
|
||||||
case PipelineEvents:
|
case PipelineEvents:
|
||||||
var pl PipelineEventPayload
|
var pl PipelineEventPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
|
||||||
case BuildEvents:
|
case BuildEvents:
|
||||||
var pl BuildEventPayload
|
var pl BuildEventPayload
|
||||||
err = json.Unmarshal([]byte(payload), &pl)
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
return pl, err
|
return pl, err
|
||||||
|
|
||||||
|
case SystemHookEvents:
|
||||||
|
var pl SystemHookPayload
|
||||||
|
err := json.Unmarshal([]byte(payload), &pl)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
switch pl.ObjectKind {
|
||||||
|
case objectPush:
|
||||||
|
return eventParsing(PushEvents, events, payload)
|
||||||
|
case objectTag:
|
||||||
|
return eventParsing(TagEvents, events, payload)
|
||||||
|
case objectMergeRequest:
|
||||||
|
return eventParsing(MergeRequestEvents, events, payload)
|
||||||
|
default:
|
||||||
|
return nil, fmt.Errorf("unknown system hook event %s", gitLabEvent)
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unknown event %s", gitLabEvent)
|
return nil, fmt.Errorf("unknown event %s", gitLabEvent)
|
||||||
}
|
}
|
||||||
|
|||||||
+61
-4
@@ -2,15 +2,13 @@ package gitlab
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
|
||||||
|
|
||||||
"io"
|
|
||||||
|
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
@@ -266,3 +264,62 @@ func TestWebhooks(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestSystemHooks(t *testing.T) {
|
||||||
|
assert := require.New(t)
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
event Event
|
||||||
|
typ interface{}
|
||||||
|
filename string
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "PushEvent",
|
||||||
|
event: PushEvents,
|
||||||
|
typ: PushEventPayload{},
|
||||||
|
filename: "../testdata/gitlab/push-event.json",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "TagEvent",
|
||||||
|
event: TagEvents,
|
||||||
|
typ: TagEventPayload{},
|
||||||
|
filename: "../testdata/gitlab/tag-event.json",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "MergeRequestEvent",
|
||||||
|
event: MergeRequestEvents,
|
||||||
|
typ: MergeRequestEventPayload{},
|
||||||
|
filename: "../testdata/gitlab/merge-request-event.json",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for _, tt := range tests {
|
||||||
|
tc := tt
|
||||||
|
client := &http.Client{}
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
payload, err := os.Open(tc.filename)
|
||||||
|
assert.NoError(err)
|
||||||
|
defer func() {
|
||||||
|
_ = payload.Close()
|
||||||
|
}()
|
||||||
|
|
||||||
|
var parseError error
|
||||||
|
var results interface{}
|
||||||
|
server := newServer(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
results, parseError = hook.Parse(r, SystemHookEvents, tc.event)
|
||||||
|
})
|
||||||
|
defer server.Close()
|
||||||
|
req, err := http.NewRequest(http.MethodPost, server.URL+path, payload)
|
||||||
|
assert.NoError(err)
|
||||||
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
req.Header.Set("X-Gitlab-Token", "sampleToken!")
|
||||||
|
req.Header.Set("X-Gitlab-Event", "System Hook")
|
||||||
|
|
||||||
|
resp, err := client.Do(req)
|
||||||
|
assert.NoError(err)
|
||||||
|
assert.Equal(http.StatusOK, resp.StatusCode)
|
||||||
|
assert.NoError(parseError)
|
||||||
|
assert.Equal(reflect.TypeOf(tc.typ), reflect.TypeOf(results))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -148,6 +148,11 @@ type BuildEventPayload struct {
|
|||||||
Repository Repository `json:"repository"`
|
Repository Repository `json:"repository"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SystemHookPayload contains the ObjectKind to match with real hook events
|
||||||
|
type SystemHookPayload struct {
|
||||||
|
ObjectKind string `json:"object_kind"`
|
||||||
|
}
|
||||||
|
|
||||||
// Issue contains all of the GitLab issue information
|
// Issue contains all of the GitLab issue information
|
||||||
type Issue struct {
|
type Issue struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
|
|||||||
+213
@@ -0,0 +1,213 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:comment:added",
|
||||||
|
"date": "2019-03-01T10:08:35+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 2,
|
||||||
|
"version": 20,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1550436762919,
|
||||||
|
"updatedDate": 1551366080055,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "50a8ee1fae3abf75738a85f9039b4b2de4947174",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "038e7b67735e54f6de8f1c5d533c6751df524f6c",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"properties": {
|
||||||
|
"repositoryId": 4
|
||||||
|
},
|
||||||
|
"id": 167,
|
||||||
|
"version": 0,
|
||||||
|
"text": "test",
|
||||||
|
"author": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"createdDate": 1551431315592,
|
||||||
|
"updatedDate": 1551431315592,
|
||||||
|
"comments": [],
|
||||||
|
"tasks": []
|
||||||
|
},
|
||||||
|
"commentParentId": 164
|
||||||
|
}
|
||||||
+210
@@ -0,0 +1,210 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:comment:deleted",
|
||||||
|
"date": "2019-03-01T10:09:09+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 2,
|
||||||
|
"version": 20,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1550436762919,
|
||||||
|
"updatedDate": 1551366080055,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "50a8ee1fae3abf75738a85f9039b4b2de4947174",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "038e7b67735e54f6de8f1c5d533c6751df524f6c",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"id": 166,
|
||||||
|
"version": 0,
|
||||||
|
"text": "test",
|
||||||
|
"author": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"createdDate": 1551431209893,
|
||||||
|
"updatedDate": 1551431209893,
|
||||||
|
"comments": [],
|
||||||
|
"tasks": []
|
||||||
|
},
|
||||||
|
"commentParentId": 165
|
||||||
|
}
|
||||||
+213
@@ -0,0 +1,213 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:comment:edited",
|
||||||
|
"date": "2019-03-01T10:06:11+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 2,
|
||||||
|
"version": 20,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1550436762919,
|
||||||
|
"updatedDate": 1551366080055,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "50a8ee1fae3abf75738a85f9039b4b2de4947174",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "038e7b67735e54f6de8f1c5d533c6751df524f6c",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"properties": {
|
||||||
|
"repositoryId": 4
|
||||||
|
},
|
||||||
|
"id": 165,
|
||||||
|
"version": 3,
|
||||||
|
"text": "yada edit comment",
|
||||||
|
"author": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"createdDate": 1551430363669,
|
||||||
|
"updatedDate": 1551431171528,
|
||||||
|
"comments": [],
|
||||||
|
"tasks": []
|
||||||
|
},
|
||||||
|
"previousComment": "yada yada yada"
|
||||||
|
}
|
||||||
+185
@@ -0,0 +1,185 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:declined",
|
||||||
|
"date": "2019-03-01T10:12:35+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 2,
|
||||||
|
"version": 23,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "DECLINED",
|
||||||
|
"open": false,
|
||||||
|
"closed": true,
|
||||||
|
"createdDate": 1550436762919,
|
||||||
|
"updatedDate": 1551431555605,
|
||||||
|
"closedDate": 1551431555605,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "50a8ee1fae3abf75738a85f9039b4b2de4947174",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "038e7b67735e54f6de8f1c5d533c6751df524f6c",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+184
@@ -0,0 +1,184 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:deleted",
|
||||||
|
"date": "2019-03-01T10:17:10+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 2,
|
||||||
|
"version": 26,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1550436762919,
|
||||||
|
"updatedDate": 1551431770064,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "50a8ee1fae3abf75738a85f9039b4b2de4947174",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "038e7b67735e54f6de8f1c5d533c6751df524f6c",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+214
@@ -0,0 +1,214 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:merged",
|
||||||
|
"date": "2019-03-01T10:37:14+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 5,
|
||||||
|
"version": 2,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "MERGED",
|
||||||
|
"open": false,
|
||||||
|
"closed": true,
|
||||||
|
"createdDate": 1551432675860,
|
||||||
|
"updatedDate": 1551433034286,
|
||||||
|
"closedDate": 1551433034286,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "cde6c45a4210afe81638aa1f3aa960d633c66a90",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [
|
||||||
|
{
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastReviewedCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": true,
|
||||||
|
"status": "APPROVED"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"participants": [],
|
||||||
|
"properties": {
|
||||||
|
"mergeCommit": {
|
||||||
|
"displayId": "cbf26be7bfc",
|
||||||
|
"id": "cbf26be7bfc8394906abbd571498fb8d28888b58"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/5"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+215
@@ -0,0 +1,215 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:modified",
|
||||||
|
"date": "2019-03-01T10:19:48+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 3,
|
||||||
|
"version": 1,
|
||||||
|
"title": "Feature/wip",
|
||||||
|
"description": "Update README",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1551431949625,
|
||||||
|
"updatedDate": 1551431988769,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "591f702354b3abf1faaca4d23811620d1b2ac984",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bibucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "038e7b67735e54f6de8f1c5d533c6751df524f6c",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bibucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [
|
||||||
|
{
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bibucket.local/users/gopher/repos/webhook-test/pull-requests/3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"previousTitle": "Feature/wip",
|
||||||
|
"previousDescription": "wip",
|
||||||
|
"previousTarget": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"type": "BRANCH",
|
||||||
|
"latestCommit": "038e7b67735e54f6de8f1c5d533c6751df524f6c",
|
||||||
|
"latestChangeset": "038e7b67735e54f6de8f1c5d533c6751df524f6c"
|
||||||
|
}
|
||||||
|
}
|
||||||
+206
@@ -0,0 +1,206 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:opened",
|
||||||
|
"date": "2019-03-01T10:31:15+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 5,
|
||||||
|
"version": 0,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1551432675860,
|
||||||
|
"updatedDate": 1551432675860,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "cde6c45a4210afe81638aa1f3aa960d633c66a90",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [
|
||||||
|
{
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/5"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+230
@@ -0,0 +1,230 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:reviewer:approved",
|
||||||
|
"date": "2019-03-01T10:35:38+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 5,
|
||||||
|
"version": 0,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1551432675860,
|
||||||
|
"updatedDate": 1551432675860,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "cde6c45a4210afe81638aa1f3aa960d633c66a90",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [
|
||||||
|
{
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastReviewedCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": true,
|
||||||
|
"status": "APPROVED"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/5"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"participant": {
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastReviewedCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": true,
|
||||||
|
"status": "APPROVED"
|
||||||
|
},
|
||||||
|
"previousStatus": "NEEDS_WORK"
|
||||||
|
}
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:reviewer:needs_work",
|
||||||
|
"date": "2019-03-01T10:34:53+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 5,
|
||||||
|
"version": 0,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1551432675860,
|
||||||
|
"updatedDate": 1551432675860,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "cde6c45a4210afe81638aa1f3aa960d633c66a90",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [
|
||||||
|
{
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastReviewedCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": false,
|
||||||
|
"status": "NEEDS_WORK"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/5"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"participant": {
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastReviewedCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": false,
|
||||||
|
"status": "NEEDS_WORK"
|
||||||
|
},
|
||||||
|
"previousStatus": "UNAPPROVED"
|
||||||
|
}
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:reviewer:unapproved",
|
||||||
|
"date": "2019-03-01T10:34:15+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 5,
|
||||||
|
"version": 0,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1551432675860,
|
||||||
|
"updatedDate": 1551432675860,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "cde6c45a4210afe81638aa1f3aa960d633c66a90",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [
|
||||||
|
{
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastReviewedCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/5"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"participant": {
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastReviewedCommit": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"previousStatus": "NEEDS_WORK"
|
||||||
|
}
|
||||||
+225
@@ -0,0 +1,225 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "pr:reviewer:updated",
|
||||||
|
"date": "2019-03-01T10:19:48+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pullRequest": {
|
||||||
|
"id": 3,
|
||||||
|
"version": 1,
|
||||||
|
"title": "Update README",
|
||||||
|
"description": "yada yada yada",
|
||||||
|
"state": "OPEN",
|
||||||
|
"open": true,
|
||||||
|
"closed": false,
|
||||||
|
"createdDate": 1551431949625,
|
||||||
|
"updatedDate": 1551431988769,
|
||||||
|
"fromRef": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"latestCommit": "591f702354b3abf1faaca4d23811620d1b2ac984",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toRef": {
|
||||||
|
"id": "refs/heads/master",
|
||||||
|
"displayId": "master",
|
||||||
|
"latestCommit": "038e7b67735e54f6de8f1c5d533c6751df524f6c",
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"locked": false,
|
||||||
|
"author": {
|
||||||
|
"user": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "AUTHOR",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
},
|
||||||
|
"reviewers": [
|
||||||
|
{
|
||||||
|
"user": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": "REVIEWER",
|
||||||
|
"approved": false,
|
||||||
|
"status": "UNAPPROVED"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"participants": [],
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/pull-requests/3"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"addedReviewers": [
|
||||||
|
{
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"removedReviewers": []
|
||||||
|
}
|
||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "repo:comment:added",
|
||||||
|
"date": "2019-02-28T16:17:06+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"properties": {
|
||||||
|
"repositoryId": 4
|
||||||
|
},
|
||||||
|
"id": 146,
|
||||||
|
"version": 0,
|
||||||
|
"text": "test",
|
||||||
|
"author": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"createdDate": 1551367026162,
|
||||||
|
"updatedDate": 1551367026162,
|
||||||
|
"comments": [],
|
||||||
|
"tasks": []
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commit": "038e7b67735e54f6de8f1c5d533c6751df524f6c"
|
||||||
|
}
|
||||||
+102
@@ -0,0 +1,102 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "repo:comment:deleted",
|
||||||
|
"date": "2019-03-01T09:40:51+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"id": 145,
|
||||||
|
"version": 1,
|
||||||
|
"text": "Test commit comment editing comment",
|
||||||
|
"author": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"createdDate": 1551366857036,
|
||||||
|
"updatedDate": 1551429525155,
|
||||||
|
"comments": [],
|
||||||
|
"tasks": []
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commit": "038e7b67735e54f6de8f1c5d533c6751df524f6c"
|
||||||
|
}
|
||||||
+106
@@ -0,0 +1,106 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "repo:comment:edited",
|
||||||
|
"date": "2019-03-01T09:38:45+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"comment": {
|
||||||
|
"properties": {
|
||||||
|
"repositoryId": 4
|
||||||
|
},
|
||||||
|
"id": 145,
|
||||||
|
"version": 1,
|
||||||
|
"text": "Test commit comment editing comment",
|
||||||
|
"author": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"createdDate": 1551366857036,
|
||||||
|
"updatedDate": 1551429525155,
|
||||||
|
"comments": [],
|
||||||
|
"tasks": []
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"commit": "038e7b67735e54f6de8f1c5d533c6751df524f6c",
|
||||||
|
"previousComment": "Test commit comment"
|
||||||
|
}
|
||||||
+132
@@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "repo:forked",
|
||||||
|
"date": "2019-02-28T16:12:04+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 124,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"origin": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "gopher@foo.bar",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"key": "~tux",
|
||||||
|
"id": 19,
|
||||||
|
"name": "Cain Piper",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "tux",
|
||||||
|
"emailAddress": "cain.piper@foo.bar",
|
||||||
|
"id": 2125,
|
||||||
|
"displayName": "Cain Piper",
|
||||||
|
"active": true,
|
||||||
|
"slug": "tux",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~tux/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~tux/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/tux/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+132
@@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "repo:modified",
|
||||||
|
"date": "2019-02-28T16:08:46+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "foo@bar.se",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"old": {
|
||||||
|
"slug": "webhook-test-2",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test-2",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "foo@bar.se",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test-2/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"new": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "foo@bar.se",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
{
|
||||||
|
"eventKey": "repo:refs_changed",
|
||||||
|
"date": "2019-03-01T10:37:14+0100",
|
||||||
|
"actor": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "foo@bar.com",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"slug": "webhook-test",
|
||||||
|
"id": 4,
|
||||||
|
"name": "webhook-test",
|
||||||
|
"scmId": "git",
|
||||||
|
"state": "AVAILABLE",
|
||||||
|
"statusMessage": "Available",
|
||||||
|
"forkable": true,
|
||||||
|
"project": {
|
||||||
|
"key": "~gopher",
|
||||||
|
"id": 2,
|
||||||
|
"name": "Foo Bar",
|
||||||
|
"type": "PERSONAL",
|
||||||
|
"owner": {
|
||||||
|
"name": "gopher",
|
||||||
|
"emailAddress": "foo@bar.com",
|
||||||
|
"id": 3231,
|
||||||
|
"displayName": "Foo Bar",
|
||||||
|
"active": true,
|
||||||
|
"slug": "gopher",
|
||||||
|
"type": "NORMAL",
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"public": false,
|
||||||
|
"links": {
|
||||||
|
"clone": [
|
||||||
|
{
|
||||||
|
"href": "ssh://git@server.bitbucket.local:7999/~gopher/webhook-test.git",
|
||||||
|
"name": "ssh"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/scm/~gopher/webhook-test.git",
|
||||||
|
"name": "http"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"self": [
|
||||||
|
{
|
||||||
|
"href": "https://server.bitbucket.local/users/gopher/repos/webhook-test/browse"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"ref": {
|
||||||
|
"id": "refs/heads/feature/wip",
|
||||||
|
"displayId": "feature/wip",
|
||||||
|
"type": "BRANCH"
|
||||||
|
},
|
||||||
|
"refId": "refs/heads/feature/wip",
|
||||||
|
"fromHash": "32a0b8a740c2963c6f56bd8baf3dc05683d299e0",
|
||||||
|
"toHash": "0000000000000000000000000000000000000000",
|
||||||
|
"type": "DELETE"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+230
@@ -0,0 +1,230 @@
|
|||||||
|
{
|
||||||
|
"action": "rerequested",
|
||||||
|
"check_run": {
|
||||||
|
"id": 4,
|
||||||
|
"head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3",
|
||||||
|
"external_id": "",
|
||||||
|
"url": "https://api.github.com/repos/github/hello-world/check-runs/4",
|
||||||
|
"html_url": "http://github.com/github/hello-world/runs/4",
|
||||||
|
"status": "completed",
|
||||||
|
"conclusion": "neutral",
|
||||||
|
"started_at": "2018-05-04T01:14:52Z",
|
||||||
|
"completed_at": "2018-05-04T01:14:52Z",
|
||||||
|
"output": {
|
||||||
|
"title": "Report",
|
||||||
|
"summary": "It's all good.",
|
||||||
|
"text": "Minus odio facilis repudiandae. Soluta odit aut amet magni nobis. Et voluptatibus ex dolorem et eum.",
|
||||||
|
"annotations_count": 2,
|
||||||
|
"annotations_url": "https://api.github.com/repos/github/hello-world/check-runs/4/annotations"
|
||||||
|
},
|
||||||
|
"name": "randscape",
|
||||||
|
"check_suite": {
|
||||||
|
"id": 5,
|
||||||
|
"head_branch": "master",
|
||||||
|
"head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3",
|
||||||
|
"status": "completed",
|
||||||
|
"conclusion": "neutral",
|
||||||
|
"url": "https://api.github.com/repos/github/hello-world/check-suites/5",
|
||||||
|
"before": "146e867f55c26428e5f9fade55a9bbf5e95a7912",
|
||||||
|
"after": "d6fde92930d4715a2b49857d24b940956b26d2d3",
|
||||||
|
"pull_requests": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"app": {
|
||||||
|
"id": 2,
|
||||||
|
"node_id": "MDExOkludGVncmF0aW9uMQ==",
|
||||||
|
"owner": {
|
||||||
|
"login": "github",
|
||||||
|
"id": 340,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
|
||||||
|
"avatar_url": "http://alambic.github.com/avatars/u/340?",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/github",
|
||||||
|
"html_url": "http://github.com/github",
|
||||||
|
"followers_url": "https://api.github.com/users/github/followers",
|
||||||
|
"following_url": "https://api.github.com/users/github/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/github/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/github/repos",
|
||||||
|
"events_url": "https://api.github.com/users/github/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/github/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"name": "Super Duper",
|
||||||
|
"description": null,
|
||||||
|
"external_url": "http://super-duper.example.com",
|
||||||
|
"html_url": "http://github.com/apps/super-duper",
|
||||||
|
"created_at": "2018-04-25 20:42:10",
|
||||||
|
"updated_at": "2018-04-25 20:42:10"
|
||||||
|
},
|
||||||
|
"created_at": "2018-05-04T01:14:52Z",
|
||||||
|
"updated_at": "2018-05-04T01:14:52Z"
|
||||||
|
},
|
||||||
|
"app": {
|
||||||
|
"id": 2,
|
||||||
|
"node_id": "MDExOkludGVncmF0aW9uMQ==",
|
||||||
|
"owner": {
|
||||||
|
"login": "github",
|
||||||
|
"id": 340,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
|
||||||
|
"avatar_url": "http://alambic.github.com/avatars/u/340?",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/github",
|
||||||
|
"html_url": "http://github.com/github",
|
||||||
|
"followers_url": "https://api.github.com/users/github/followers",
|
||||||
|
"following_url": "https://api.github.com/users/github/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/github/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/github/repos",
|
||||||
|
"events_url": "https://api.github.com/users/github/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/github/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"name": "Super Duper",
|
||||||
|
"description": null,
|
||||||
|
"external_url": "http://super-duper.example.com",
|
||||||
|
"html_url": "http://github.com/apps/super-duper",
|
||||||
|
"created_at": "2018-04-25 20:42:10",
|
||||||
|
"updated_at": "2018-04-25 20:42:10"
|
||||||
|
},
|
||||||
|
"pull_requests": [
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"id": 526,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkxMzU0OTMyMzM=",
|
||||||
|
"name": "hello-world",
|
||||||
|
"full_name": "github/hello-world",
|
||||||
|
"owner": {
|
||||||
|
"login": "github",
|
||||||
|
"id": 340,
|
||||||
|
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
|
||||||
|
"avatar_url": "http://alambic.github.com/avatars/u/340?",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/github",
|
||||||
|
"html_url": "http://github.com/github",
|
||||||
|
"followers_url": "https://api.github.com/users/github/followers",
|
||||||
|
"following_url": "https://api.github.com/users/github/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/github/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/github/repos",
|
||||||
|
"events_url": "https://api.github.com/users/github/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/github/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"private": false,
|
||||||
|
"html_url": "http://github.com/github/hello-world",
|
||||||
|
"description": null,
|
||||||
|
"fork": false,
|
||||||
|
"url": "https://api.github.com/repos/github/hello-world",
|
||||||
|
"forks_url": "https://api.github.com/repos/github/hello-world/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/github/hello-world/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/github/hello-world/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/github/hello-world/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/github/hello-world/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/github/hello-world/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/github/hello-world/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/github/hello-world/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/github/hello-world/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/github/hello-world/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/github/hello-world/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/github/hello-world/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/github/hello-world/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/github/hello-world/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/github/hello-world/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/github/hello-world/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/github/hello-world/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/github/hello-world/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/github/hello-world/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/github/hello-world/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/github/hello-world/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/github/hello-world/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/github/hello-world/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/github/hello-world/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/github/hello-world/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/github/hello-world/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/github/hello-world/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/github/hello-world/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/github/hello-world/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/github/hello-world/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/github/hello-world/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/github/hello-world/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/github/hello-world/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/github/hello-world/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/github/hello-world/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/github/hello-world/deployments",
|
||||||
|
"created_at": "2018-04-25T20:42:10Z",
|
||||||
|
"updated_at": "2018-04-25T20:43:34Z",
|
||||||
|
"pushed_at": "2018-05-04T01:14:47Z",
|
||||||
|
"git_url": "git://github.com/github/hello-world.git",
|
||||||
|
"ssh_url": "ssh://git@localhost:3035/github/hello-world.git",
|
||||||
|
"clone_url": "http://github.com/github/hello-world.git",
|
||||||
|
"svn_url": "http://github.com/github/hello-world",
|
||||||
|
"homepage": null,
|
||||||
|
"size": 0,
|
||||||
|
"stargazers_count": 0,
|
||||||
|
"watchers_count": 0,
|
||||||
|
"language": null,
|
||||||
|
"has_issues": true,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 0,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"open_issues_count": 3,
|
||||||
|
"license": null,
|
||||||
|
"forks": 0,
|
||||||
|
"open_issues": 3,
|
||||||
|
"watchers": 0,
|
||||||
|
"default_branch": "master"
|
||||||
|
},
|
||||||
|
"organization": {
|
||||||
|
"login": "github",
|
||||||
|
"id": 340,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5",
|
||||||
|
"url": "https://api.github.com/orgs/github",
|
||||||
|
"repos_url": "https://api.github.com/orgs/github/repos",
|
||||||
|
"events_url": "https://api.github.com/orgs/github/events",
|
||||||
|
"hooks_url": "https://api.github.com/orgs/github/hooks",
|
||||||
|
"issues_url": "https://api.github.com/orgs/github/issues",
|
||||||
|
"members_url": "https://api.github.com/orgs/github/members{/member}",
|
||||||
|
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
|
||||||
|
"avatar_url": "http://alambic.github.com/avatars/u/340?",
|
||||||
|
"description": "How people build software."
|
||||||
|
},
|
||||||
|
"sender": {
|
||||||
|
"login": "octocat",
|
||||||
|
"id": 5346,
|
||||||
|
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
|
||||||
|
"avatar_url": "http://alambic.github.com/avatars/u/5346?",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/octocat",
|
||||||
|
"html_url": "http://github.com/octocat",
|
||||||
|
"followers_url": "https://api.github.com/users/octocat/followers",
|
||||||
|
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/octocat/repos",
|
||||||
|
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"installation": {
|
||||||
|
"id": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+194
@@ -0,0 +1,194 @@
|
|||||||
|
{
|
||||||
|
"action": "requested",
|
||||||
|
"check_suite": {
|
||||||
|
"id": 5,
|
||||||
|
"head_branch": "master",
|
||||||
|
"head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3",
|
||||||
|
"status": "completed",
|
||||||
|
"conclusion": "neutral",
|
||||||
|
"url": "https://api.github.com/repos/github/hello-world/check-suites/5",
|
||||||
|
"before": "146e867f55c26428e5f9fade55a9bbf5e95a7912",
|
||||||
|
"after": "d6fde92930d4715a2b49857d24b940956b26d2d3",
|
||||||
|
"pull_requests": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"app": {
|
||||||
|
"id": 2,
|
||||||
|
"node_id": "MDExOkludGVncmF0aW9uMQ==",
|
||||||
|
"owner": {
|
||||||
|
"login": "github",
|
||||||
|
"id": 340,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
|
||||||
|
"avatar_url": "http://alambic.github.com/avatars/u/340?",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/github",
|
||||||
|
"html_url": "http://github.com/github",
|
||||||
|
"followers_url": "https://api.github.com/users/github/followers",
|
||||||
|
"following_url": "https://api.github.com/users/github/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/github/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/github/repos",
|
||||||
|
"events_url": "https://api.github.com/users/github/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/github/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"name": "Super Duper",
|
||||||
|
"description": null,
|
||||||
|
"external_url": "http://super-duper.example.com",
|
||||||
|
"html_url": "http://github.com/apps/super-duper",
|
||||||
|
"created_at": "2018-04-25 20:42:10",
|
||||||
|
"updated_at": "2018-04-25 20:42:10"
|
||||||
|
},
|
||||||
|
"created_at": "2018-05-04T01:14:52Z",
|
||||||
|
"updated_at": "2018-05-04T01:14:52Z",
|
||||||
|
"latest_check_runs_count": 1,
|
||||||
|
"check_runs_url": "https://api.github.com/repos/github/hello-world/check-suites/5/check-runs",
|
||||||
|
"head_commit": {
|
||||||
|
"id": "d6fde92930d4715a2b49857d24b940956b26d2d3",
|
||||||
|
"tree_id": "41a846c7d878d279f11355e23b348e1bb63b89a8",
|
||||||
|
"message": "Say hello (again) to everybody",
|
||||||
|
"timestamp": "2018-05-04T01:14:46Z",
|
||||||
|
"author": {
|
||||||
|
"name": "octocat",
|
||||||
|
"email": "octocat@github.com"
|
||||||
|
},
|
||||||
|
"committer": {
|
||||||
|
"name": "octocat",
|
||||||
|
"email": "octocat@github.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"id": 526,
|
||||||
|
"node_id": "MDEwOlJlcG9zaXRvcnkxMzU0OTMyMzM=",
|
||||||
|
"name": "hello-world",
|
||||||
|
"full_name": "github/hello-world",
|
||||||
|
"owner": {
|
||||||
|
"login": "github",
|
||||||
|
"id": 340,
|
||||||
|
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
|
||||||
|
"avatar_url": "http://alambic.github.com/avatars/u/340?",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/github",
|
||||||
|
"html_url": "http://github.com/github",
|
||||||
|
"followers_url": "https://api.github.com/users/github/followers",
|
||||||
|
"following_url": "https://api.github.com/users/github/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/github/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/github/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/github/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/github/repos",
|
||||||
|
"events_url": "https://api.github.com/users/github/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/github/received_events",
|
||||||
|
"type": "Organization",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"private": false,
|
||||||
|
"html_url": "http://github.com/github/hello-world",
|
||||||
|
"description": null,
|
||||||
|
"fork": false,
|
||||||
|
"url": "https://api.github.com/repos/github/hello-world",
|
||||||
|
"forks_url": "https://api.github.com/repos/github/hello-world/forks",
|
||||||
|
"keys_url": "https://api.github.com/repos/github/hello-world/keys{/key_id}",
|
||||||
|
"collaborators_url": "https://api.github.com/repos/github/hello-world/collaborators{/collaborator}",
|
||||||
|
"teams_url": "https://api.github.com/repos/github/hello-world/teams",
|
||||||
|
"hooks_url": "https://api.github.com/repos/github/hello-world/hooks",
|
||||||
|
"issue_events_url": "https://api.github.com/repos/github/hello-world/issues/events{/number}",
|
||||||
|
"events_url": "https://api.github.com/repos/github/hello-world/events",
|
||||||
|
"assignees_url": "https://api.github.com/repos/github/hello-world/assignees{/user}",
|
||||||
|
"branches_url": "https://api.github.com/repos/github/hello-world/branches{/branch}",
|
||||||
|
"tags_url": "https://api.github.com/repos/github/hello-world/tags",
|
||||||
|
"blobs_url": "https://api.github.com/repos/github/hello-world/git/blobs{/sha}",
|
||||||
|
"git_tags_url": "https://api.github.com/repos/github/hello-world/git/tags{/sha}",
|
||||||
|
"git_refs_url": "https://api.github.com/repos/github/hello-world/git/refs{/sha}",
|
||||||
|
"trees_url": "https://api.github.com/repos/github/hello-world/git/trees{/sha}",
|
||||||
|
"statuses_url": "https://api.github.com/repos/github/hello-world/statuses/{sha}",
|
||||||
|
"languages_url": "https://api.github.com/repos/github/hello-world/languages",
|
||||||
|
"stargazers_url": "https://api.github.com/repos/github/hello-world/stargazers",
|
||||||
|
"contributors_url": "https://api.github.com/repos/github/hello-world/contributors",
|
||||||
|
"subscribers_url": "https://api.github.com/repos/github/hello-world/subscribers",
|
||||||
|
"subscription_url": "https://api.github.com/repos/github/hello-world/subscription",
|
||||||
|
"commits_url": "https://api.github.com/repos/github/hello-world/commits{/sha}",
|
||||||
|
"git_commits_url": "https://api.github.com/repos/github/hello-world/git/commits{/sha}",
|
||||||
|
"comments_url": "https://api.github.com/repos/github/hello-world/comments{/number}",
|
||||||
|
"issue_comment_url": "https://api.github.com/repos/github/hello-world/issues/comments{/number}",
|
||||||
|
"contents_url": "https://api.github.com/repos/github/hello-world/contents/{+path}",
|
||||||
|
"compare_url": "https://api.github.com/repos/github/hello-world/compare/{base}...{head}",
|
||||||
|
"merges_url": "https://api.github.com/repos/github/hello-world/merges",
|
||||||
|
"archive_url": "https://api.github.com/repos/github/hello-world/{archive_format}{/ref}",
|
||||||
|
"downloads_url": "https://api.github.com/repos/github/hello-world/downloads",
|
||||||
|
"issues_url": "https://api.github.com/repos/github/hello-world/issues{/number}",
|
||||||
|
"pulls_url": "https://api.github.com/repos/github/hello-world/pulls{/number}",
|
||||||
|
"milestones_url": "https://api.github.com/repos/github/hello-world/milestones{/number}",
|
||||||
|
"notifications_url": "https://api.github.com/repos/github/hello-world/notifications{?since,all,participating}",
|
||||||
|
"labels_url": "https://api.github.com/repos/github/hello-world/labels{/name}",
|
||||||
|
"releases_url": "https://api.github.com/repos/github/hello-world/releases{/id}",
|
||||||
|
"deployments_url": "https://api.github.com/repos/github/hello-world/deployments",
|
||||||
|
"created_at": "2018-04-25T20:42:10Z",
|
||||||
|
"updated_at": "2018-04-25T20:43:34Z",
|
||||||
|
"pushed_at": "2018-05-04T01:14:47Z",
|
||||||
|
"git_url": "git://github.com/github/hello-world.git",
|
||||||
|
"ssh_url": "ssh://git@localhost:3035/github/hello-world.git",
|
||||||
|
"clone_url": "http://github.com/github/hello-world.git",
|
||||||
|
"svn_url": "http://github.com/github/hello-world",
|
||||||
|
"homepage": null,
|
||||||
|
"size": 0,
|
||||||
|
"stargazers_count": 0,
|
||||||
|
"watchers_count": 0,
|
||||||
|
"language": null,
|
||||||
|
"has_issues": true,
|
||||||
|
"has_projects": true,
|
||||||
|
"has_downloads": true,
|
||||||
|
"has_wiki": true,
|
||||||
|
"has_pages": false,
|
||||||
|
"forks_count": 0,
|
||||||
|
"mirror_url": null,
|
||||||
|
"archived": false,
|
||||||
|
"open_issues_count": 3,
|
||||||
|
"license": null,
|
||||||
|
"forks": 0,
|
||||||
|
"open_issues": 3,
|
||||||
|
"watchers": 0,
|
||||||
|
"default_branch": "master"
|
||||||
|
},
|
||||||
|
"organization": {
|
||||||
|
"login": "github",
|
||||||
|
"id": 340,
|
||||||
|
"node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5",
|
||||||
|
"url": "https://api.github.com/orgs/github",
|
||||||
|
"repos_url": "https://api.github.com/orgs/github/repos",
|
||||||
|
"events_url": "https://api.github.com/orgs/github/events",
|
||||||
|
"hooks_url": "https://api.github.com/orgs/github/hooks",
|
||||||
|
"issues_url": "https://api.github.com/orgs/github/issues",
|
||||||
|
"members_url": "https://api.github.com/orgs/github/members{/member}",
|
||||||
|
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
|
||||||
|
"avatar_url": "http://alambic.github.com/avatars/u/340?",
|
||||||
|
"description": "How people build software."
|
||||||
|
},
|
||||||
|
"sender": {
|
||||||
|
"login": "octocat",
|
||||||
|
"id": 5346,
|
||||||
|
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
|
||||||
|
"avatar_url": "http://alambic.github.com/avatars/u/5346?",
|
||||||
|
"gravatar_id": "",
|
||||||
|
"url": "https://api.github.com/users/octocat",
|
||||||
|
"html_url": "http://github.com/octocat",
|
||||||
|
"followers_url": "https://api.github.com/users/octocat/followers",
|
||||||
|
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
||||||
|
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
||||||
|
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
||||||
|
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
||||||
|
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
||||||
|
"repos_url": "https://api.github.com/users/octocat/repos",
|
||||||
|
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
||||||
|
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
||||||
|
"type": "User",
|
||||||
|
"site_admin": false
|
||||||
|
},
|
||||||
|
"installation": {
|
||||||
|
"id": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"action": "published",
|
||||||
|
"security_advisory": {
|
||||||
|
"ghsa_id": "GHSA-rf4j-j272-fj86",
|
||||||
|
"summary": "Moderate severity vulnerability that affects django",
|
||||||
|
"description": "django.contrib.auth.forms.AuthenticationForm in Django 2.0 before 2.0.2, and 1.11.8 and 1.11.9, allows remote attackers to obtain potentially sensitive information by leveraging data exposure from the confirm_login_allowed() method, as demonstrated by discovering whether a user account is inactive.",
|
||||||
|
"severity": "moderate",
|
||||||
|
"identifiers": [
|
||||||
|
{
|
||||||
|
"value": "GHSA-rf4j-j272-fj86",
|
||||||
|
"type": "GHSA"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "CVE-2018-6188",
|
||||||
|
"type": "CVE"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-6188"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"published_at": "2018-10-03T21:13:54Z",
|
||||||
|
"updated_at": "2018-10-03T21:13:54Z",
|
||||||
|
"withdrawn_at": null,
|
||||||
|
"vulnerabilities": [
|
||||||
|
{
|
||||||
|
"package": {
|
||||||
|
"ecosystem": "pip",
|
||||||
|
"name": "django"
|
||||||
|
},
|
||||||
|
"severity": "moderate",
|
||||||
|
"vulnerable_version_range": ">= 2.0.0, < 2.0.2",
|
||||||
|
"first_patched_version": {
|
||||||
|
"identifier": "2.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"package": {
|
||||||
|
"ecosystem": "pip",
|
||||||
|
"name": "django"
|
||||||
|
},
|
||||||
|
"severity": "moderate",
|
||||||
|
"vulnerable_version_range": ">= 1.11.8, < 1.11.10",
|
||||||
|
"first_patched_version": {
|
||||||
|
"identifier": "1.11.10"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user