Update BitBucket + GitLab Payloads
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
Library webhooks
|
Library webhooks
|
||||||
================
|
================
|
||||||
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v2/logo.png">
|
<img align="right" src="https://raw.githubusercontent.com/go-playground/webhooks/v3/logo.png">
|
||||||
[](https://semaphoreci.com/joeybloggs/webhooks)
|
[](https://semaphoreci.com/joeybloggs/webhooks)
|
||||||
[](https://coveralls.io/github/go-playground/webhooks?branch=v2)
|
[](https://coveralls.io/github/go-playground/webhooks?branch=v3)
|
||||||
[](https://goreportcard.com/report/go-playground/webhooks)
|
[](https://goreportcard.com/report/go-playground/webhooks)
|
||||||
[](https://godoc.org/gopkg.in/go-playground/webhooks.v2)
|
[](https://godoc.org/gopkg.in/go-playground/webhooks.v3)
|
||||||

|

|
||||||
|
|
||||||
Library webhooks allows for easy recieving and parsing of GitHub, Bitbucket and GitLab Webhook Events
|
Library webhooks allows for easy recieving and parsing of GitHub, Bitbucket and GitLab Webhook Events
|
||||||
@@ -24,17 +24,17 @@ Installation
|
|||||||
Use go get.
|
Use go get.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
go get -u gopkg.in/go-playground/webhooks.v2
|
go get -u gopkg.in/go-playground/webhooks.v3
|
||||||
```
|
```
|
||||||
|
|
||||||
Then import the package into your own code.
|
Then import the package into your own code.
|
||||||
|
|
||||||
import "gopkg.in/go-playground/webhooks.v2"
|
import "gopkg.in/go-playground/webhooks.v3"
|
||||||
|
|
||||||
Usage and Documentation
|
Usage and Documentation
|
||||||
------
|
------
|
||||||
|
|
||||||
Please see http://godoc.org/gopkg.in/go-playground/webhooks.v2 for detailed usage docs.
|
Please see http://godoc.org/gopkg.in/go-playground/webhooks.v3 for detailed usage docs.
|
||||||
|
|
||||||
##### Examples:
|
##### Examples:
|
||||||
|
|
||||||
@@ -46,8 +46,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"gopkg.in/go-playground/webhooks.v2"
|
"gopkg.in/go-playground/webhooks.v3"
|
||||||
"gopkg.in/go-playground/webhooks.v2/github"
|
"gopkg.in/go-playground/webhooks.v3/github"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -104,8 +104,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"gopkg.in/go-playground/webhooks.v2"
|
"gopkg.in/go-playground/webhooks.v3"
|
||||||
"gopkg.in/go-playground/webhooks.v2/github"
|
"gopkg.in/go-playground/webhooks.v3/github"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
+24
-19
@@ -25,23 +25,24 @@ type Event string
|
|||||||
|
|
||||||
// Bitbucket hook types
|
// Bitbucket hook types
|
||||||
const (
|
const (
|
||||||
RepoPushEvent Event = "repo:push"
|
RepoPushEvent Event = "repo:push"
|
||||||
RepoForkEvent Event = "repo:fork"
|
RepoForkEvent Event = "repo:fork"
|
||||||
RepoCommitCommentCreatedEvent Event = "repo:commit_comment_created"
|
RepoUpdatedEvent Event = "repo:updated"
|
||||||
RepoCommitStatusCreatedEvent Event = "repo:commit_status_created"
|
RepoCommitCommentCreatedEvent Event = "repo:commit_comment_created"
|
||||||
RepoCommitStatusUpdatedEvent Event = "repo:commit_status_updated"
|
RepoCommitStatusCreatedEvent Event = "repo:commit_status_created"
|
||||||
IssueCreatedEvent Event = "issue:created"
|
RepoCommitStatusUpdatedEvent Event = "repo:commit_status_updated"
|
||||||
IssueUpdatedEvent Event = "issue:updated"
|
IssueCreatedEvent Event = "issue:created"
|
||||||
IssueCommentCreatedEvent Event = "issue:comment_created"
|
IssueUpdatedEvent Event = "issue:updated"
|
||||||
PullRequestCreatedEvent Event = "pullrequest:created"
|
IssueCommentCreatedEvent Event = "issue:comment_created"
|
||||||
PullRequestUpdatedEvent Event = "pullrequest:updated"
|
PullRequestCreatedEvent Event = "pullrequest:created"
|
||||||
PullRequestApprovedEvent Event = "pullrequest:approved"
|
PullRequestUpdatedEvent Event = "pullrequest:updated"
|
||||||
PullRequestApprovalRemovedEvent Event = "pullrequest:unapproved"
|
PullRequestApprovedEvent Event = "pullrequest:approved"
|
||||||
PullRequestMergedEvent Event = "pullrequest:fulfilled"
|
PullRequestUnapprovedEvent Event = "pullrequest:unapproved"
|
||||||
PullRequestDeclinedEvent Event = "pullrequest:rejected"
|
PullRequestMergedEvent Event = "pullrequest:fulfilled"
|
||||||
PullRequestCommentCreatedEvent Event = "pullrequest:comment_created"
|
PullRequestDeclinedEvent Event = "pullrequest:rejected"
|
||||||
PullRequestCommentUpdatedEvent Event = "pullrequest:comment_updated"
|
PullRequestCommentCreatedEvent Event = "pullrequest:comment_created"
|
||||||
PullRequestCommentDeletedEvent Event = "pull_request:comment_deleted"
|
PullRequestCommentUpdatedEvent Event = "pullrequest:comment_updated"
|
||||||
|
PullRequestCommentDeletedEvent Event = "pull_request:comment_deleted"
|
||||||
)
|
)
|
||||||
|
|
||||||
// New creates and returns a WebHook instance denoted by the Provider type
|
// New creates and returns a WebHook instance denoted by the Provider type
|
||||||
@@ -111,6 +112,10 @@ func (hook Webhook) ParsePayload(w http.ResponseWriter, r *http.Request) {
|
|||||||
var pl RepoForkPayload
|
var pl RepoForkPayload
|
||||||
json.Unmarshal([]byte(payload), &pl)
|
json.Unmarshal([]byte(payload), &pl)
|
||||||
hook.runProcessPayloadFunc(fn, pl, hd)
|
hook.runProcessPayloadFunc(fn, pl, hd)
|
||||||
|
case RepoUpdatedEvent:
|
||||||
|
var pl RepoUpdatedPayload
|
||||||
|
json.Unmarshal([]byte(payload), &pl)
|
||||||
|
hook.runProcessPayloadFunc(fn, pl, hd)
|
||||||
case RepoCommitCommentCreatedEvent:
|
case RepoCommitCommentCreatedEvent:
|
||||||
var pl RepoCommitCommentCreatedPayload
|
var pl RepoCommitCommentCreatedPayload
|
||||||
json.Unmarshal([]byte(payload), &pl)
|
json.Unmarshal([]byte(payload), &pl)
|
||||||
@@ -147,8 +152,8 @@ func (hook Webhook) ParsePayload(w http.ResponseWriter, r *http.Request) {
|
|||||||
var pl PullRequestApprovedPayload
|
var pl PullRequestApprovedPayload
|
||||||
json.Unmarshal([]byte(payload), &pl)
|
json.Unmarshal([]byte(payload), &pl)
|
||||||
hook.runProcessPayloadFunc(fn, pl, hd)
|
hook.runProcessPayloadFunc(fn, pl, hd)
|
||||||
case PullRequestApprovalRemovedEvent:
|
case PullRequestUnapprovedEvent:
|
||||||
var pl PullRequestApprovalRemovedPayload
|
var pl PullRequestUnapprovedPayload
|
||||||
json.Unmarshal([]byte(payload), &pl)
|
json.Unmarshal([]byte(payload), &pl)
|
||||||
hook.runProcessPayloadFunc(fn, pl, hd)
|
hook.runProcessPayloadFunc(fn, pl, hd)
|
||||||
case PullRequestMergedEvent:
|
case PullRequestMergedEvent:
|
||||||
|
|||||||
+157
-1
@@ -39,7 +39,27 @@ func TestMain(m *testing.M) {
|
|||||||
|
|
||||||
// setup
|
// setup
|
||||||
hook = New(&Config{UUID: "MY_UUID"})
|
hook = New(&Config{UUID: "MY_UUID"})
|
||||||
hook.RegisterEvents(HandlePayload, RepoPushEvent, RepoForkEvent, RepoCommitCommentCreatedEvent, RepoCommitStatusCreatedEvent, RepoCommitStatusUpdatedEvent, IssueCreatedEvent, IssueUpdatedEvent, IssueCommentCreatedEvent, PullRequestCreatedEvent, PullRequestUpdatedEvent, PullRequestApprovedEvent, PullRequestApprovalRemovedEvent, PullRequestMergedEvent, PullRequestDeclinedEvent, PullRequestCommentCreatedEvent, PullRequestCommentUpdatedEvent, PullRequestCommentDeletedEvent)
|
hook.RegisterEvents(
|
||||||
|
HandlePayload,
|
||||||
|
RepoPushEvent,
|
||||||
|
RepoForkEvent,
|
||||||
|
RepoUpdatedEvent,
|
||||||
|
RepoCommitCommentCreatedEvent,
|
||||||
|
RepoCommitStatusCreatedEvent,
|
||||||
|
RepoCommitStatusUpdatedEvent,
|
||||||
|
IssueCreatedEvent,
|
||||||
|
IssueUpdatedEvent,
|
||||||
|
IssueCommentCreatedEvent,
|
||||||
|
PullRequestCreatedEvent,
|
||||||
|
PullRequestUpdatedEvent,
|
||||||
|
PullRequestApprovedEvent,
|
||||||
|
PullRequestUnapprovedEvent,
|
||||||
|
PullRequestMergedEvent,
|
||||||
|
PullRequestDeclinedEvent,
|
||||||
|
PullRequestCommentCreatedEvent,
|
||||||
|
PullRequestCommentUpdatedEvent,
|
||||||
|
PullRequestCommentDeletedEvent,
|
||||||
|
)
|
||||||
|
|
||||||
go webhooks.Run(hook, "127.0.0.1:"+strconv.Itoa(port), path)
|
go webhooks.Run(hook, "127.0.0.1:"+strconv.Itoa(port), path)
|
||||||
time.Sleep(time.Millisecond * 500)
|
time.Sleep(time.Millisecond * 500)
|
||||||
@@ -445,6 +465,142 @@ func TestRepoFork(t *testing.T) {
|
|||||||
Equal(t, resp.StatusCode, http.StatusOK)
|
Equal(t, resp.StatusCode, http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestRepoUpdated(t *testing.T) {
|
||||||
|
|
||||||
|
payload := `{
|
||||||
|
"actor": {
|
||||||
|
"type": "user",
|
||||||
|
"username": "emmap1",
|
||||||
|
"display_name": "Emma",
|
||||||
|
"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
|
||||||
|
"links": {
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://api.bitbucket.org/emmap1"
|
||||||
|
},
|
||||||
|
"avatar": {
|
||||||
|
"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "repository",
|
||||||
|
"links": {
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.bitbucket.org/api/2.0/repositories/bitbucket/bitbucket"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://api.bitbucket.org/bitbucket/bitbucket"
|
||||||
|
},
|
||||||
|
"avatar": {
|
||||||
|
"href": "https://api-staging-assetroot.s3.amazonaws.com/c/photos/2014/Aug/01/bitbucket-logo-2629490769-3_avatar.png"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uuid": "{673a6070-3421-46c9-9d48-90745f7bfe8e}",
|
||||||
|
"project": {
|
||||||
|
"type": "project",
|
||||||
|
"project": "Untitled project",
|
||||||
|
"uuid": "{3b7898dc-6891-4225-ae60-24613bb83080}",
|
||||||
|
"links": {
|
||||||
|
"html": {
|
||||||
|
"href": "https://bitbucket.org/account/user/teamawesome/projects/proj"
|
||||||
|
},
|
||||||
|
"avatar": {
|
||||||
|
"href": "https://bitbucket.org/account/user/teamawesome/projects/proj/avatar/32"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"key": "proj"
|
||||||
|
},
|
||||||
|
"full_name": "team_name/repo_name",
|
||||||
|
"name": "repo_name",
|
||||||
|
"website": "https://mywebsite.com/",
|
||||||
|
"owner": {
|
||||||
|
"type": "user",
|
||||||
|
"username": "emmap1",
|
||||||
|
"display_name": "Emma",
|
||||||
|
"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
|
||||||
|
"links": {
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://api.bitbucket.org/emmap1"
|
||||||
|
},
|
||||||
|
"avatar": {
|
||||||
|
"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scm": "git",
|
||||||
|
"is_private": true
|
||||||
|
},
|
||||||
|
"changes": {
|
||||||
|
"name": {
|
||||||
|
"new": "repository",
|
||||||
|
"old": "repository_name"
|
||||||
|
},
|
||||||
|
"website": {
|
||||||
|
"new": "http://www.example.com/",
|
||||||
|
"old": ""
|
||||||
|
},
|
||||||
|
"language": {
|
||||||
|
"new": "java",
|
||||||
|
"old": ""
|
||||||
|
},
|
||||||
|
"links": {
|
||||||
|
"new": {
|
||||||
|
"avatar": {
|
||||||
|
"href": "https://bitbucket.org/teamawesome/repository/avatar/32/"
|
||||||
|
},
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.bitbucket.org/2.0/repositories/teamawesome/repository"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://bitbucket.org/teamawesome/repository"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"old": {
|
||||||
|
"avatar": {
|
||||||
|
"href": "https://bitbucket.org/teamawesome/repository_name/avatar/32/"
|
||||||
|
},
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.bitbucket.org/2.0/repositories/teamawesome/repository_name"
|
||||||
|
},
|
||||||
|
"html": {
|
||||||
|
"href": "https://bitbucket.org/teamawesome/repository_name"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"new": "This is a better description.",
|
||||||
|
"old": "This is a description."
|
||||||
|
},
|
||||||
|
"full_name": {
|
||||||
|
"new": "teamawesome/repository",
|
||||||
|
"old": "teamawesome/repository_name"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
|
req, err := http.NewRequest("POST", "http://127.0.0.1:3009/webhooks", bytes.NewBuffer([]byte(payload)))
|
||||||
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
req.Header.Set("X-Hook-UUID", "MY_UUID")
|
||||||
|
req.Header.Set("X-Event-Key", "repo:updated")
|
||||||
|
|
||||||
|
Equal(t, err, nil)
|
||||||
|
|
||||||
|
client := &http.Client{}
|
||||||
|
resp, err := client.Do(req)
|
||||||
|
Equal(t, err, nil)
|
||||||
|
|
||||||
|
defer resp.Body.Close()
|
||||||
|
|
||||||
|
Equal(t, resp.StatusCode, http.StatusOK)
|
||||||
|
}
|
||||||
|
|
||||||
func TestRepoCommitCommentCreated(t *testing.T) {
|
func TestRepoCommitCommentCreated(t *testing.T) {
|
||||||
|
|
||||||
payload := `{
|
payload := `{
|
||||||
|
|||||||
+457
-337
@@ -2,388 +2,508 @@ package bitbucket
|
|||||||
|
|
||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
// PullRequestCommentDeletedPayload is the Bitbucket pull_request:comment_deleted payload
|
// RepoPushPayload is the Bitbucket repo:push payload
|
||||||
type PullRequestCommentDeletedPayload struct {
|
type RepoPushPayload struct {
|
||||||
Actor User `json:"actor"`
|
Actor Owner `json:"actor"`
|
||||||
Repository Repository `json:"repository"`
|
|
||||||
PullRequest PullRequest `json:"pullrequest"`
|
|
||||||
Comment Comment `json:"comment"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PullRequestCommentUpdatedPayload is the Bitbucket pullrequest:comment_updated payload
|
|
||||||
type PullRequestCommentUpdatedPayload struct {
|
|
||||||
Actor User `json:"actor"`
|
|
||||||
Repository Repository `json:"repository"`
|
|
||||||
PullRequest PullRequest `json:"pullrequest"`
|
|
||||||
Comment Comment `json:"comment"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PullRequestCommentCreatedPayload is the Bitbucket pullrequest:comment_created payload
|
|
||||||
type PullRequestCommentCreatedPayload struct {
|
|
||||||
Actor User `json:"actor"`
|
|
||||||
Repository Repository `json:"repository"`
|
|
||||||
PullRequest PullRequest `json:"pullrequest"`
|
|
||||||
Comment Comment `json:"comment"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PullRequestDeclinedPayload is the Bitbucket pullrequest:rejected payload
|
|
||||||
type PullRequestDeclinedPayload struct {
|
|
||||||
Actor User `json:"actor"`
|
|
||||||
PullRequest PullRequest `json:"pullrequest"`
|
|
||||||
Repository Repository `json:"repository"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PullRequestMergedPayload is the Bitbucket pullrequest:fulfilled payload
|
|
||||||
type PullRequestMergedPayload struct {
|
|
||||||
Actor User `json:"actor"`
|
|
||||||
PullRequest PullRequest `json:"pullrequest"`
|
|
||||||
Repository Repository `json:"repository"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PullRequestApprovalRemovedPayload is the Bitbucket pullrequest:unapproved payload
|
|
||||||
type PullRequestApprovalRemovedPayload struct {
|
|
||||||
Actor User `json:"actor"`
|
|
||||||
PullRequest PullRequest `json:"pullrequest"`
|
|
||||||
Repository Repository `json:"repository"`
|
|
||||||
Approval Approval `json:"approval"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PullRequestApprovedPayload is the Bitbucket pullrequest:approved payload
|
|
||||||
type PullRequestApprovedPayload struct {
|
|
||||||
Actor User `json:"actor"`
|
|
||||||
PullRequest PullRequest `json:"pullrequest"`
|
|
||||||
Repository Repository `json:"repository"`
|
|
||||||
Approval Approval `json:"approval"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PullRequestUpdatedPayload is the Bitbucket pullrequest:updated payload
|
|
||||||
type PullRequestUpdatedPayload struct {
|
|
||||||
Actor User `json:"actor"`
|
|
||||||
PullRequest PullRequest `json:"pullrequest"`
|
|
||||||
Repository Repository `json:"repository"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PullRequestCreatedPayload is the Bitbucket pullrequest:created payload
|
|
||||||
type PullRequestCreatedPayload struct {
|
|
||||||
Actor User `json:"actor"`
|
|
||||||
PullRequest PullRequest `json:"pullrequest"`
|
|
||||||
Repository Repository `json:"repository"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// IssueCommentCreatedPayload is the Bitbucket issue:comment_created payload
|
|
||||||
type IssueCommentCreatedPayload struct {
|
|
||||||
Actor User `json:"actor"`
|
|
||||||
Repository Repository `json:"repository"`
|
Repository Repository `json:"repository"`
|
||||||
Issue Issue `json:"issue"`
|
Push struct {
|
||||||
Comment Comment `json:"comment"`
|
Changes []struct {
|
||||||
}
|
New struct {
|
||||||
|
Type string `json:"type"`
|
||||||
// IssueUpdatedPayload is the Bitbucket issue:updated payload
|
Name string `json:"name"`
|
||||||
type IssueUpdatedPayload struct {
|
Target struct {
|
||||||
Actor User `json:"actor"`
|
Type string `json:"type"`
|
||||||
Issue Issue `json:"issue"`
|
Hash string `json:"hash"`
|
||||||
Repository Repository `json:"repository"`
|
Author Owner `json:"author"`
|
||||||
Comment Comment `json:"comment"`
|
Message string `json:"message"`
|
||||||
Changes IssueChanges `json:"changes"`
|
Date time.Time `json:"date"`
|
||||||
}
|
Parents []struct {
|
||||||
|
Type string `json:"type"`
|
||||||
// IssueCreatedPayload is the Bitbucket issue:created payload
|
Hash string `json:"hash"`
|
||||||
type IssueCreatedPayload struct {
|
Links struct {
|
||||||
Actor User `json:"actor"`
|
Self struct {
|
||||||
Issue Issue `json:"issue"`
|
Href string `json:"href"`
|
||||||
Repository Repository `json:"repository"`
|
} `json:"self"`
|
||||||
}
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
// RepoCommitStatusUpdatedPayload is the Bitbucket repo:commit_status_updated payload
|
} `json:"html"`
|
||||||
type RepoCommitStatusUpdatedPayload struct {
|
} `json:"links"`
|
||||||
Actor User `json:"actor"`
|
} `json:"parents"`
|
||||||
Repository Repository `json:"repository"`
|
Links struct {
|
||||||
CommitStatus CommitStatus `json:"commit_status"`
|
Self struct {
|
||||||
}
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
// RepoCommitStatusCreatedPayload is the Bitbucket repo:commit_status_created payload
|
HTML struct {
|
||||||
type RepoCommitStatusCreatedPayload struct {
|
Href string `json:"href"`
|
||||||
Actor User `json:"actor"`
|
} `json:"html"`
|
||||||
Repository Repository `json:"repository"`
|
} `json:"links"`
|
||||||
CommitStatus CommitStatus `json:"commit_status"`
|
} `json:"target"`
|
||||||
}
|
Links struct {
|
||||||
|
Self struct {
|
||||||
// RepoCommitCommentCreatedPayload is the Bitbucket repo:commit_comment_created payload
|
Href string `json:"href"`
|
||||||
type RepoCommitCommentCreatedPayload struct {
|
} `json:"self"`
|
||||||
Actor User `json:"actor"`
|
Commits struct {
|
||||||
Comment Comment `json:"comment"`
|
Href string `json:"href"`
|
||||||
Repository Repository `json:"repository"`
|
} `json:"commits"`
|
||||||
Commit CommitHash `json:"commit"`
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
} `json:"links"`
|
||||||
|
} `json:"new"`
|
||||||
|
Old struct {
|
||||||
|
Type string `json:"type"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Target struct {
|
||||||
|
Type string `json:"type"`
|
||||||
|
Hash string `json:"hash"`
|
||||||
|
Author Owner `json:"author"`
|
||||||
|
Message string `json:"message"`
|
||||||
|
Date time.Time `json:"date"`
|
||||||
|
Parents []struct {
|
||||||
|
Type string `json:"type"`
|
||||||
|
Hash string `json:"hash"`
|
||||||
|
Links struct {
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
} `json:"links"`
|
||||||
|
} `json:"parents"`
|
||||||
|
Links struct {
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
} `json:"links"`
|
||||||
|
} `json:"target"`
|
||||||
|
Links struct {
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
Commits struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"commits"`
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
} `json:"links"`
|
||||||
|
} `json:"old"`
|
||||||
|
Links struct {
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
Diff struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"diff"`
|
||||||
|
Commits struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"commits"`
|
||||||
|
} `json:"links"`
|
||||||
|
Created bool `json:"created"`
|
||||||
|
Forced bool `json:"forced"`
|
||||||
|
Closed bool `json:"closed"`
|
||||||
|
Commits []struct {
|
||||||
|
Hash string `json:"hash"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
Message string `json:"message"`
|
||||||
|
Author Owner `json:"author"`
|
||||||
|
Links struct {
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
} `json:"links"`
|
||||||
|
} `json:"commits"`
|
||||||
|
Truncated bool `json:"truncated"`
|
||||||
|
} `json:"changes"`
|
||||||
|
} `json:"push"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RepoForkPayload is the Bitbucket repo:fork payload
|
// RepoForkPayload is the Bitbucket repo:fork payload
|
||||||
type RepoForkPayload struct {
|
type RepoForkPayload struct {
|
||||||
Actor User `json:"actor"`
|
Actor Owner `json:"actor"`
|
||||||
Repository Repository `json:"repository"`
|
Repository Repository `json:"repository"`
|
||||||
Fork Repository `json:"fork"`
|
Fork Repository `json:"fork"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// RepoPushPayload is the Bitbucket repo:push payload
|
// RepoUpdatedPayload is the Bitbucket repo:updated payload
|
||||||
type RepoPushPayload struct {
|
type RepoUpdatedPayload struct {
|
||||||
Actor User `json:"actor"`
|
Actor Owner `json:"actor"`
|
||||||
Repository Repository `json:"repository"`
|
Repository Repository `json:"repository"`
|
||||||
Push Push `json:"push"`
|
Changes struct {
|
||||||
|
Name struct {
|
||||||
|
New string `json:"new"`
|
||||||
|
Old string `json:"old"`
|
||||||
|
} `json:"name"`
|
||||||
|
Website struct {
|
||||||
|
New string `json:"new"`
|
||||||
|
Old string `json:"old"`
|
||||||
|
} `json:"website"`
|
||||||
|
Language struct {
|
||||||
|
New string `json:"new"`
|
||||||
|
Old string `json:"old"`
|
||||||
|
} `json:"language"`
|
||||||
|
Links struct {
|
||||||
|
New struct {
|
||||||
|
Avatar struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"avatar"`
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
} `json:"new"`
|
||||||
|
Old struct {
|
||||||
|
Avatar struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"avatar"`
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
} `json:"old"`
|
||||||
|
} `json:"links"`
|
||||||
|
Description struct {
|
||||||
|
New string `json:"new"`
|
||||||
|
Old string `json:"old"`
|
||||||
|
} `json:"description"`
|
||||||
|
FullName struct {
|
||||||
|
New string `json:"new"`
|
||||||
|
Old string `json:"old"`
|
||||||
|
} `json:"full_name"`
|
||||||
|
} `json:"changes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Approval is the common Bitbucket Issue Approval Sub Entity
|
// RepoCommitCommentCreatedPayload is the Bitbucket repo:commit_comment_created payload
|
||||||
type Approval struct {
|
type RepoCommitCommentCreatedPayload struct {
|
||||||
Date time.Time `json:"date"`
|
Actor Owner `json:"actor"`
|
||||||
User User `json:"user"`
|
Comment Comment `json:"comment"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
Commit struct {
|
||||||
|
Hash string `json:"hash"`
|
||||||
|
} `json:"commit"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IssueChanges is the common Bitbucket Issue Changes Sub Entity
|
// RepoCommitStatusCreatedPayload is the Bitbucket repo:commit_status_created payload
|
||||||
type IssueChanges struct {
|
type RepoCommitStatusCreatedPayload struct {
|
||||||
Status IssueChangeStatus `json:"status"`
|
Actor Owner `json:"actor"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
CommitStatus struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
State string `json:"state"`
|
||||||
|
Key string `json:"key"`
|
||||||
|
URL string `json:"url"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
CreatedOn time.Time `json:"created_on"`
|
||||||
|
UpdatedOn time.Time `json:"updated_on"`
|
||||||
|
Links struct {
|
||||||
|
Commit struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"commit"`
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
} `json:"links"`
|
||||||
|
} `json:"commit_status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IssueChangeStatus is the common Bitbucket Issue Change Status Sub Entity
|
// RepoCommitStatusUpdatedPayload is the Bitbucket repo:commit_status_updated payload
|
||||||
type IssueChangeStatus struct {
|
type RepoCommitStatusUpdatedPayload struct {
|
||||||
Old string `json:"old"`
|
Actor Owner `json:"actor"`
|
||||||
New string `json:"new"`
|
Repository Repository `json:"repository"`
|
||||||
|
CommitStatus struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Description string `json:"description"`
|
||||||
|
State string `json:"state"`
|
||||||
|
Key string `json:"key"`
|
||||||
|
URL string `json:"url"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
CreatedOn time.Time `json:"created_on"`
|
||||||
|
UpdatedOn time.Time `json:"updated_on"`
|
||||||
|
Links struct {
|
||||||
|
Commit struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"commit"`
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
} `json:"links"`
|
||||||
|
} `json:"commit_status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CommitStatus is the common Bitbucket CommitStatus Sub Entity
|
// IssueCreatedPayload is the Bitbucket issue:created payload
|
||||||
type CommitStatus struct {
|
type IssueCreatedPayload struct {
|
||||||
Name string `json:"name"`
|
Actor Owner `json:"actor"`
|
||||||
Description string `json:"description"`
|
Issue Issue `json:"issue"`
|
||||||
State string `json:"state"`
|
Repository Repository `json:"repository"`
|
||||||
Key string `json:"key"`
|
|
||||||
URL string `json:"url"`
|
|
||||||
Type string `json:"type"`
|
|
||||||
CreatedOn time.Time `json:"created_on"`
|
|
||||||
UpdatedOn time.Time `json:"updated_on"`
|
|
||||||
Links LinksSelfCommit `json:"links"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Push is the common Bitbucket Push Sub Entity
|
// IssueUpdatedPayload is the Bitbucket issue:updated payload
|
||||||
type Push struct {
|
type IssueUpdatedPayload struct {
|
||||||
Changes []Change `json:"changes"`
|
Actor Owner `json:"actor"`
|
||||||
|
Issue Issue `json:"issue"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
Changes struct {
|
||||||
|
Status struct {
|
||||||
|
Old string `json:"old"`
|
||||||
|
New string `json:"new"`
|
||||||
|
} `json:"status"`
|
||||||
|
} `json:"changes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change is the common Bitbucket Change Sub Entity
|
// IssueCommentCreatedPayload is the Bitbucket pullrequest:created payload
|
||||||
type Change struct {
|
type IssueCommentCreatedPayload struct {
|
||||||
New ChangeData `json:"new"`
|
Actor Owner `json:"actor"`
|
||||||
Old ChangeData `json:"old"`
|
Repository Repository `json:"repository"`
|
||||||
Links LinksHTMLDiffCommits `json:"links"`
|
Issue Issue `json:"issue"`
|
||||||
Created bool `json:"created"`
|
Comment Comment `json:"comment"`
|
||||||
Forced bool `json:"forced"`
|
|
||||||
Closed bool `json:"closed"`
|
|
||||||
Commits []Commit `json:"commits"`
|
|
||||||
Truncated bool `json:"truncated"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChangeData is the common Bitbucket ChangeData Sub Entity
|
// PullRequestCreatedPayload is the Bitbucket pullrequest:created payload
|
||||||
type ChangeData struct {
|
type PullRequestCreatedPayload struct {
|
||||||
Type string `json:"type"`
|
Actor Owner `json:"actor"`
|
||||||
Name string `json:"name"`
|
PullRequest PullRequest `json:"pullrequest"`
|
||||||
Target Target `json:"target"`
|
Repository Repository `json:"repository"`
|
||||||
Links LinksHTMLSelfCommits `json:"links"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Target is the common Bitbucket Target Sub Entity
|
// PullRequestUpdatedPayload is the Bitbucket pullrequest:updated payload
|
||||||
type Target struct {
|
type PullRequestUpdatedPayload struct {
|
||||||
Type string `json:"type"`
|
Actor Owner `json:"actor"`
|
||||||
Hash string `json:"hash"`
|
PullRequest PullRequest `json:"pullrequest"`
|
||||||
Author User `json:"author"`
|
Repository Repository `json:"repository"`
|
||||||
Message string `json:"message"`
|
|
||||||
Date time.Time `json:"date"`
|
|
||||||
Parents []Parent `json:"parents"`
|
|
||||||
Links LinksHTMLSelf `json:"links"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parent is the common Bitbucket Parent Sub Entity
|
// PullRequestApprovedPayload is the Bitbucket pullrequest:approved payload
|
||||||
type Parent struct {
|
type PullRequestApprovedPayload struct {
|
||||||
Type string `json:"type"`
|
Actor Owner `json:"actor"`
|
||||||
Hash string `json:"hash"`
|
PullRequest PullRequest `json:"pullrequest"`
|
||||||
Links LinksHTMLSelf `json:"links"`
|
Repository Repository `json:"repository"`
|
||||||
|
Approval struct {
|
||||||
|
Date time.Time `json:"date"`
|
||||||
|
User Owner `json:"user"`
|
||||||
|
} `json:"approval"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit is the common Bitbucket Commit Sub Entity
|
// PullRequestUnapprovedPayload is the Bitbucket pullrequest:unapproved payload
|
||||||
type Commit struct {
|
type PullRequestUnapprovedPayload struct {
|
||||||
Hash string `json:"hash"`
|
Actor Owner `json:"actor"`
|
||||||
Type string `json:"type"`
|
PullRequest PullRequest `json:"pullrequest"`
|
||||||
Message string `json:"message"`
|
Repository Repository `json:"repository"`
|
||||||
Author User `json:"author"`
|
Approval struct {
|
||||||
Links LinksHTMLSelf `json:"links"`
|
Date time.Time `json:"date"`
|
||||||
|
User Owner `json:"user"`
|
||||||
|
} `json:"approval"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// User is the common Bitbucket User Entity
|
// PullRequestMergedPayload is the Bitbucket pullrequest:fulfilled payload
|
||||||
type User struct {
|
type PullRequestMergedPayload struct {
|
||||||
|
Actor Owner `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullrequest"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// PullRequestDeclinedPayload is the Bitbucket pullrequest:rejected payload
|
||||||
|
type PullRequestDeclinedPayload struct {
|
||||||
|
Actor Owner `json:"actor"`
|
||||||
|
PullRequest PullRequest `json:"pullrequest"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// PullRequestCommentCreatedPayload is the Bitbucket pullrequest:comment_updated payload
|
||||||
|
type PullRequestCommentCreatedPayload struct {
|
||||||
|
Actor Owner `json:"actor"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
PullRequest PullRequest `json:"pullrequest"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// PullRequestCommentUpdatedPayload is the Bitbucket pullrequest:comment_created payload
|
||||||
|
type PullRequestCommentUpdatedPayload struct {
|
||||||
|
Actor Owner `json:"actor"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
PullRequest PullRequest `json:"pullrequest"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// PullRequestCommentDeletedPayload is the Bitbucket pullrequest:comment_deleted payload
|
||||||
|
type PullRequestCommentDeletedPayload struct {
|
||||||
|
Actor Owner `json:"actor"`
|
||||||
|
Repository Repository `json:"repository"`
|
||||||
|
PullRequest PullRequest `json:"pullrequest"`
|
||||||
|
Comment Comment `json:"comment"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Owner is the common Bitbucket Owner Sub Entity
|
||||||
|
type Owner struct {
|
||||||
|
Type string `json:"type"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
DisplayName string `json:"display_name"`
|
DisplayName string `json:"display_name"`
|
||||||
UUID string `json:"uuid"`
|
UUID string `json:"uuid"`
|
||||||
Links Links `json:"links"`
|
Links struct {
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
Avatar struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"avatar"`
|
||||||
|
} `json:"links"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Repository is the common Bitbucket Repository Entity
|
// Repository is the common Bitbucket Repository Sub Entity
|
||||||
type Repository struct {
|
type Repository struct {
|
||||||
Links Links `json:"links"`
|
Type string `json:"type"`
|
||||||
UUID string `json:"uuid"`
|
Links struct {
|
||||||
FullName string `json:"full_name"`
|
Self struct {
|
||||||
Name string `json:"name"`
|
Href string `json:"href"`
|
||||||
Scm string `json:"scm"`
|
} `json:"self"`
|
||||||
IsPrivate bool `json:"is_private"`
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
Avatar struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"avatar"`
|
||||||
|
} `json:"links"`
|
||||||
|
UUID string `json:"uuid"`
|
||||||
|
Project Project `json:"project"`
|
||||||
|
FullName string `json:"full_name"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Website string `json:"website"`
|
||||||
|
Owner Owner `json:"owner"`
|
||||||
|
Scm string `json:"scm"`
|
||||||
|
IsPrivate bool `json:"is_private"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Issue is the common Bitbucket Issue Entity
|
// Project is the common Bitbucket Project Sub Entity
|
||||||
|
type Project struct {
|
||||||
|
Type string `json:"type"`
|
||||||
|
Project string `json:"project"`
|
||||||
|
UUID string `json:"uuid"`
|
||||||
|
Links struct {
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
Avatar struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"avatar"`
|
||||||
|
} `json:"links"`
|
||||||
|
Key string `json:"key"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Issue is the common Bitbucket Issue Sub Entity
|
||||||
type Issue struct {
|
type Issue struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Component string `json:"component"`
|
Component string `json:"component"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Content Content `json:"content"`
|
Content struct {
|
||||||
Priority string `json:"priority"`
|
Raw string `json:"raw"`
|
||||||
State string `json:"state"`
|
HTML string `json:"html"`
|
||||||
Type string `json:"type"`
|
Markup string `json:"markup"`
|
||||||
Milestone Milestone `json:"milestone"`
|
} `json:"content"`
|
||||||
Version Version `json:"version"`
|
Priority string `json:"priority"`
|
||||||
CreatedOn time.Time `json:"created_on"`
|
State string `json:"state"`
|
||||||
UpdatedOn time.Time `json:"updated_on"`
|
Type string `json:"type"`
|
||||||
Links LinksHTMLSelf `json:"links"`
|
Milestone struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
} `json:"milestone"`
|
||||||
|
Version struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
} `json:"version"`
|
||||||
|
CreatedOn time.Time `json:"created_on"`
|
||||||
|
UpdatedOn time.Time `json:"updated_on"`
|
||||||
|
Links struct {
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
} `json:"links"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Comment is the common Bitbucket Comment Entity
|
// Comment is the common Bitbucket Comment Sub Entity
|
||||||
type Comment struct {
|
type Comment struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Parent ParentID `json:"parent"`
|
Parent struct {
|
||||||
Content Content `json:"content"`
|
ID int64 `json:"id"`
|
||||||
Inline Inline `json:"inline"`
|
} `json:"parent"`
|
||||||
CreatedOn time.Time `json:"created_on"`
|
Content struct {
|
||||||
UpdatedOn time.Time `json:"updated_on"`
|
Raw string `json:"raw"`
|
||||||
Links LinksHTMLSelf `json:"links"`
|
HTML string `json:"html"`
|
||||||
|
Markup string `json:"markup"`
|
||||||
|
} `json:"content"`
|
||||||
|
Inline struct {
|
||||||
|
Path string `json:"path"`
|
||||||
|
From *int64 `json:"from"`
|
||||||
|
To int64 `json:"to"`
|
||||||
|
} `json:"inline"`
|
||||||
|
CreatedOn time.Time `json:"created_on"`
|
||||||
|
UpdatedOn time.Time `json:"updated_on"`
|
||||||
|
Links struct {
|
||||||
|
Self struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
|
HTML struct {
|
||||||
|
Href string `json:"href"`
|
||||||
|
} `json:"html"`
|
||||||
|
} `json:"links"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PullRequest is the common Bitbucket PullRequest Entity
|
// PullRequest is the common Bitbucket Pull Request Sub Entity
|
||||||
type PullRequest struct {
|
type PullRequest struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
Author User `json:"author"`
|
Author Owner `json:"author"`
|
||||||
Source Source `json:"source"`
|
Source struct {
|
||||||
Destination Destination `json:"destination"`
|
Branch struct {
|
||||||
MergeCommit CommitHash `json:"merge_commit"`
|
Name string `json:"name"`
|
||||||
Participants []User `json:"participants"`
|
} `json:"branch"`
|
||||||
Reviewers []User `json:"reviewers"`
|
Commit struct {
|
||||||
CloseSourceBranch bool `json:"close_source_branch"`
|
Hash string `json:"hash"`
|
||||||
ClosedBy User `json:"closed_by"`
|
} `json:"commit"`
|
||||||
Reason string `json:"reason"`
|
Repository Repository `json:"repository"`
|
||||||
CreatedOn time.Time `json:"created_on"`
|
} `json:"source"`
|
||||||
UpdatedOn time.Time `json:"updated_on"`
|
Destination struct {
|
||||||
Links LinksHTMLSelf `json:"links"`
|
Branch struct {
|
||||||
}
|
Name string `json:"name"`
|
||||||
|
} `json:"branch"`
|
||||||
// Destination is the common Bitbucket Destination Sub Entity
|
Commit struct {
|
||||||
type Destination struct {
|
Hash string `json:"hash"`
|
||||||
Branch Branch `json:"branch"`
|
} `json:"commit"`
|
||||||
Commit CommitHash `json:"commit"`
|
Repository Repository `json:"repository"`
|
||||||
Repository Repository `json:"repository"`
|
} `json:"destination"`
|
||||||
}
|
MergeCommit struct {
|
||||||
|
Hash string `json:"hash"`
|
||||||
// Source is the common Bitbucket Source Sub Entity
|
} `json:"merge_commit"`
|
||||||
type Source struct {
|
Participants []Owner `json:"participants"`
|
||||||
Branch Branch `json:"branch"`
|
Reviewers []Owner `json:"reviewers"`
|
||||||
Commit CommitHash `json:"commit"`
|
CloseSourceBranch bool `json:"close_source_branch"`
|
||||||
Repository Repository `json:"repository"`
|
ClosedBy Owner `json:"closed_by"`
|
||||||
}
|
Reason string `json:"reason"`
|
||||||
|
CreatedOn time.Time `json:"created_on"`
|
||||||
// Branch is the common Bitbucket Branch Sub Entity
|
UpdatedOn time.Time `json:"updated_on"`
|
||||||
type Branch struct {
|
Links struct {
|
||||||
Name string `json:"name"`
|
Self struct {
|
||||||
}
|
Href string `json:"href"`
|
||||||
|
} `json:"self"`
|
||||||
// CommitHash is the common Bitbucket CommitHash Sub Entity
|
HTML struct {
|
||||||
type CommitHash struct {
|
Href string `json:"href"`
|
||||||
Hash string `json:"hash"`
|
} `json:"html"`
|
||||||
}
|
} `json:"links"`
|
||||||
|
|
||||||
// Inline is the common Bitbucket Inline Sub Entity
|
|
||||||
type Inline struct {
|
|
||||||
Path string `json:"path"`
|
|
||||||
From *int64 `json:"from"`
|
|
||||||
To int64 `json:"to"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ParentID is the common Bitbucket ParentID Sub Entity
|
|
||||||
type ParentID struct {
|
|
||||||
ID int64 `json:"id"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Avatar is the common Bitbucket Avatar Sub Entity
|
|
||||||
type Avatar struct {
|
|
||||||
HREF string `json:"href"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// HTML is the common Bitbucket HTML Sub Entity
|
|
||||||
type HTML struct {
|
|
||||||
HREF string `json:"href"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Self is the common Bitbucket Self Sub Entity
|
|
||||||
type Self struct {
|
|
||||||
HREF string `json:"href"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Diff is the common Bitbucket Diff Sub Entity
|
|
||||||
type Diff struct {
|
|
||||||
HREF string `json:"href"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Commits is the common Bitbucket Commits Sub Entity
|
|
||||||
type Commits struct {
|
|
||||||
HREF string `json:"href"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// LinksSelfCommit is the common Bitbucket LinksSelfCommit Sub Entity
|
|
||||||
type LinksSelfCommit struct {
|
|
||||||
Self Self `json:"self"`
|
|
||||||
Commit Commits `json:"commit"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// LinksHTMLSelfCommits is the common Bitbucket LinksHTMLSelfCommits Sub Entity
|
|
||||||
type LinksHTMLSelfCommits struct {
|
|
||||||
Self Self `json:"self"`
|
|
||||||
Commits Commits `json:"commits"`
|
|
||||||
HTML HTML `json:"html"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// LinksHTMLDiffCommits is the common Bitbucket LinksHTMLDiffCommits Sub Entity
|
|
||||||
type LinksHTMLDiffCommits struct {
|
|
||||||
HTML HTML `json:"html"`
|
|
||||||
Diff Diff `json:"diff"`
|
|
||||||
Commits Commits `json:"commits"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Links is the common Bitbucket Links Sub Entity
|
|
||||||
type Links struct {
|
|
||||||
Avatar Avatar `json:"avatar"`
|
|
||||||
HTML HTML `json:"html"`
|
|
||||||
Self Self `json:"self"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// LinksHTMLSelf is the common Bitbucket LinksHTMLSelf Sub Entity
|
|
||||||
type LinksHTMLSelf struct {
|
|
||||||
HTML HTML `json:"html"`
|
|
||||||
Self Self `json:"self"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Content is the common Bitbucket Content Sub Entity
|
|
||||||
type Content struct {
|
|
||||||
HTML string `json:"html"`
|
|
||||||
Markup string `json:"markup"`
|
|
||||||
Raw string `json:"raw"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Milestone is the common Bitbucket Milestone Sub Entity
|
|
||||||
type Milestone struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Version is the common Bitbucket Version Sub Entity
|
|
||||||
type Version struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ func HandleRelease(payload interface{}, header webhooks.Header) {
|
|||||||
pl := payload.(github.ReleasePayload)
|
pl := payload.(github.ReleasePayload)
|
||||||
|
|
||||||
// only want to compile on full releases
|
// only want to compile on full releases
|
||||||
if pl.Release.Draft || pl.Release.Prelelease || pl.Release.TargetCommitish != "master" {
|
if pl.Release.Draft || pl.Release.Prerelease || pl.Release.TargetCommitish != "master" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+45
-45
@@ -54,15 +54,15 @@ type PushEventPayload struct {
|
|||||||
After string `json:"after"`
|
After string `json:"after"`
|
||||||
Ref string `json:"ref"`
|
Ref string `json:"ref"`
|
||||||
CheckoutSHA string `json:"checkout_sha"`
|
CheckoutSHA string `json:"checkout_sha"`
|
||||||
UserID int `json:"user_id"`
|
UserID int64 `json:"user_id"`
|
||||||
UserName string `json:"user_name"`
|
UserName string `json:"user_name"`
|
||||||
UserEmail string `json:"user_email"`
|
UserEmail string `json:"user_email"`
|
||||||
UserAvatar string `json:"user_avatar"`
|
UserAvatar string `json:"user_avatar"`
|
||||||
ProjectID int `json:"project_id"`
|
ProjectID int64 `json:"project_id"`
|
||||||
Project Project `json:"Project"`
|
Project Project `json:"Project"`
|
||||||
Repository Repository `json:"repository"`
|
Repository Repository `json:"repository"`
|
||||||
Commits []Commit `json:"commits"`
|
Commits []Commit `json:"commits"`
|
||||||
TotalCommitsCount int `json:"total_commits_count"`
|
TotalCommitsCount int64 `json:"total_commits_count"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TagEventPayload contains the information for GitLab's tag push event
|
// TagEventPayload contains the information for GitLab's tag push event
|
||||||
@@ -72,14 +72,14 @@ type TagEventPayload struct {
|
|||||||
After string `json:"after"`
|
After string `json:"after"`
|
||||||
Ref string `json:"ref"`
|
Ref string `json:"ref"`
|
||||||
CheckoutSHA string `json:"checkout_sha"`
|
CheckoutSHA string `json:"checkout_sha"`
|
||||||
UserID int `json:"user_id"`
|
UserID int64 `json:"user_id"`
|
||||||
UserName string `json:"user_name"`
|
UserName string `json:"user_name"`
|
||||||
UserAvatar string `json:"user_avatar"`
|
UserAvatar string `json:"user_avatar"`
|
||||||
ProjectID int `json:"project_id"`
|
ProjectID int64 `json:"project_id"`
|
||||||
Project Project `json:"Project"`
|
Project Project `json:"Project"`
|
||||||
Repository Repository `json:"repository"`
|
Repository Repository `json:"repository"`
|
||||||
Commits []Commit `json:"commits"`
|
Commits []Commit `json:"commits"`
|
||||||
TotalCommitsCount int `json:"total_commits_count"`
|
TotalCommitsCount int64 `json:"total_commits_count"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// WikiPageEventPayload contains the information for GitLab's wiki created/updated event
|
// WikiPageEventPayload contains the information for GitLab's wiki created/updated event
|
||||||
@@ -105,7 +105,7 @@ type PipelineEventPayload struct {
|
|||||||
type CommentEventPayload struct {
|
type CommentEventPayload struct {
|
||||||
ObjectKind string `json:"object_kind"`
|
ObjectKind string `json:"object_kind"`
|
||||||
User User `json:"user"`
|
User User `json:"user"`
|
||||||
ProjectID int `json:"project_id"`
|
ProjectID int64 `json:"project_id"`
|
||||||
Project Project `json:"project"`
|
Project Project `json:"project"`
|
||||||
Repository Repository `json:"repository"`
|
Repository Repository `json:"repository"`
|
||||||
ObjectAttributes ObjectAttributes `json:"object_attributes"`
|
ObjectAttributes ObjectAttributes `json:"object_attributes"`
|
||||||
@@ -122,15 +122,15 @@ type BuildEventPayload struct {
|
|||||||
Tag bool `json:"tag"`
|
Tag bool `json:"tag"`
|
||||||
BeforeSHA string `json:"before_sha"`
|
BeforeSHA string `json:"before_sha"`
|
||||||
SHA string `json:"sha"`
|
SHA string `json:"sha"`
|
||||||
BuildID int `json:"build_id"`
|
BuildID int64 `json:"build_id"`
|
||||||
BuildName string `json:"build_name"`
|
BuildName string `json:"build_name"`
|
||||||
BuildStage string `json:"build_stage"`
|
BuildStage string `json:"build_stage"`
|
||||||
BuildStatus string `json:"build_status"`
|
BuildStatus string `json:"build_status"`
|
||||||
BuildStartedAt customTime `json:"build_started_at"`
|
BuildStartedAt customTime `json:"build_started_at"`
|
||||||
BuildFinishedAt customTime `json:"build_finished_at"`
|
BuildFinishedAt customTime `json:"build_finished_at"`
|
||||||
BuildDuration int `json:"build_duration"`
|
BuildDuration int64 `json:"build_duration"`
|
||||||
BuildAllowFailure bool `json:"build_allow_failure"`
|
BuildAllowFailure bool `json:"build_allow_failure"`
|
||||||
ProjectID int `json:"project_id"`
|
ProjectID int64 `json:"project_id"`
|
||||||
ProjectName string `json:"project_name"`
|
ProjectName string `json:"project_name"`
|
||||||
User User `json:"user"`
|
User User `json:"user"`
|
||||||
Commit BuildCommit `json:"commit"`
|
Commit BuildCommit `json:"commit"`
|
||||||
@@ -139,24 +139,24 @@ type BuildEventPayload struct {
|
|||||||
|
|
||||||
// Issue contais all of the GitLab issue information
|
// Issue contais all of the GitLab issue information
|
||||||
type Issue struct {
|
type Issue struct {
|
||||||
ID int `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
AssigneeID int `json:"assignee_id"`
|
AssigneeID int64 `json:"assignee_id"`
|
||||||
AuthorID int `json:"author_id"`
|
AuthorID int64 `json:"author_id"`
|
||||||
ProjectID int `json:"project_id"`
|
ProjectID int64 `json:"project_id"`
|
||||||
CreatedAt customTime `json:"created_at"`
|
CreatedAt customTime `json:"created_at"`
|
||||||
UpdatedAt customTime `json:"updated_at"`
|
UpdatedAt customTime `json:"updated_at"`
|
||||||
Position int `json:"position"`
|
Position int64 `json:"position"`
|
||||||
BranchName string `json:"branch_name"`
|
BranchName string `json:"branch_name"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
MilestoneID int `json:"milestone_id"`
|
MilestoneID int64 `json:"milestone_id"`
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
IID int `json:"iid"`
|
IID int64 `json:"iid"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build contais all of the GitLab build information
|
// Build contais all of the GitLab build information
|
||||||
type Build struct {
|
type Build struct {
|
||||||
ID int `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Stage string `json:"stage"`
|
Stage string `json:"stage"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
@@ -199,30 +199,30 @@ type Commit struct {
|
|||||||
|
|
||||||
// BuildCommit contais all of the GitLab build commit information
|
// BuildCommit contais all of the GitLab build commit information
|
||||||
type BuildCommit struct {
|
type BuildCommit struct {
|
||||||
ID int `json:"id"`
|
ID int64 `json:"id"`
|
||||||
SHA string `json:"sha"`
|
SHA string `json:"sha"`
|
||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
AuthorName string `json:"auuthor_name"`
|
AuthorName string `json:"auuthor_name"`
|
||||||
AuthorEmail string `json:"author_email"`
|
AuthorEmail string `json:"author_email"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Duration int `json:"duration"`
|
Duration int64 `json:"duration"`
|
||||||
StartedAt customTime `json:"started_at"`
|
StartedAt customTime `json:"started_at"`
|
||||||
FinishedAt customTime `json:"finished_at"`
|
FinishedAt customTime `json:"finished_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Snippet contais all of the GitLab snippet information
|
// Snippet contais all of the GitLab snippet information
|
||||||
type Snippet struct {
|
type Snippet struct {
|
||||||
ID int `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
AuthorID int `json:"author_id"`
|
AuthorID int64 `json:"author_id"`
|
||||||
ProjectID int `json:"project_id"`
|
ProjectID int64 `json:"project_id"`
|
||||||
CreatedAt customTime `json:"created_at"`
|
CreatedAt customTime `json:"created_at"`
|
||||||
UpdatedAt customTime `json:"updated_at"`
|
UpdatedAt customTime `json:"updated_at"`
|
||||||
FileName string `json:"file_name"`
|
FileName string `json:"file_name"`
|
||||||
ExpiresAt customTime `json:"expires_at"`
|
ExpiresAt customTime `json:"expires_at"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
VisibilityLevel int `json:"visibility_level"`
|
VisibilityLevel int64 `json:"visibility_level"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// User contais all of the GitLab user information
|
// User contais all of the GitLab user information
|
||||||
@@ -241,7 +241,7 @@ type Project struct {
|
|||||||
GitSSSHURL string `json:"git_ssh_url"`
|
GitSSSHURL string `json:"git_ssh_url"`
|
||||||
GitHTTPURL string `json:"git_http_url"`
|
GitHTTPURL string `json:"git_http_url"`
|
||||||
Namespace string `json:"namespace"`
|
Namespace string `json:"namespace"`
|
||||||
VisibilityLevel int `json:"visibility_level"`
|
VisibilityLevel int64 `json:"visibility_level"`
|
||||||
PathWithNamespace string `json:"path_with_namespace"`
|
PathWithNamespace string `json:"path_with_namespace"`
|
||||||
DefaultBranch string `json:"default_branch"`
|
DefaultBranch string `json:"default_branch"`
|
||||||
Homepage string `json:"homepage"`
|
Homepage string `json:"homepage"`
|
||||||
@@ -260,25 +260,25 @@ type Repository struct {
|
|||||||
|
|
||||||
// ObjectAttributes contais all of the GitLab object attributes information
|
// ObjectAttributes contais all of the GitLab object attributes information
|
||||||
type ObjectAttributes struct {
|
type ObjectAttributes struct {
|
||||||
ID int `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
AssigneeID int `json:"assignee_id"`
|
AssigneeID int64 `json:"assignee_id"`
|
||||||
AuthorID int `json:"author_id"`
|
AuthorID int64 `json:"author_id"`
|
||||||
ProjectID int `json:"project_id"`
|
ProjectID int64 `json:"project_id"`
|
||||||
CreatedAt customTime `json:"created_at"`
|
CreatedAt customTime `json:"created_at"`
|
||||||
UpdatedAt customTime `json:"updated_at"`
|
UpdatedAt customTime `json:"updated_at"`
|
||||||
Position int `json:"position"`
|
Position int64 `json:"position"`
|
||||||
BranchName string `json:"branch_name"`
|
BranchName string `json:"branch_name"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
MilestoneID int `json:"milestone_id"`
|
MilestoneID int64 `json:"milestone_id"`
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
IID int `json:"iid"`
|
IID int64 `json:"iid"`
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
Action string `json:"action"`
|
Action string `json:"action"`
|
||||||
TargetBranch string `json:"target_branch"`
|
TargetBranch string `json:"target_branch"`
|
||||||
SourceBranch string `json:"source_branch"`
|
SourceBranch string `json:"source_branch"`
|
||||||
SourceProjectID int `json:"source_project_id"`
|
SourceProjectID int64 `json:"source_project_id"`
|
||||||
TargetProjectID int `json:"target_project_id"`
|
TargetProjectID int64 `json:"target_project_id"`
|
||||||
StCommits string `json:"st_commits"`
|
StCommits string `json:"st_commits"`
|
||||||
MergeStatus string `json:"merge_status"`
|
MergeStatus string `json:"merge_status"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
@@ -291,13 +291,13 @@ type ObjectAttributes struct {
|
|||||||
BeforeSHA string `json:"before_sha"`
|
BeforeSHA string `json:"before_sha"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Stages []string `json:"stages"`
|
Stages []string `json:"stages"`
|
||||||
Duration int `json:"duration"`
|
Duration int64 `json:"duration"`
|
||||||
Note string `json:"note"`
|
Note string `json:"note"`
|
||||||
NotebookType string `json:"noteable_type"`
|
NotebookType string `json:"noteable_type"`
|
||||||
At customTime `json:"attachment"`
|
At customTime `json:"attachment"`
|
||||||
LineCode string `json:"line_code"`
|
LineCode string `json:"line_code"`
|
||||||
CommitID string `json:"commit_id"`
|
CommitID string `json:"commit_id"`
|
||||||
NoteableID int `json:"noteable_id"`
|
NoteableID int64 `json:"noteable_id"`
|
||||||
System bool `json:"system"`
|
System bool `json:"system"`
|
||||||
WorkInProgress bool `json:"work_in_progress"`
|
WorkInProgress bool `json:"work_in_progress"`
|
||||||
StDiffs []StDiff `json:"st_diffs"`
|
StDiffs []StDiff `json:"st_diffs"`
|
||||||
@@ -309,22 +309,22 @@ type ObjectAttributes struct {
|
|||||||
|
|
||||||
// MergeRequest contais all of the GitLab merge request information
|
// MergeRequest contais all of the GitLab merge request information
|
||||||
type MergeRequest struct {
|
type MergeRequest struct {
|
||||||
ID int `json:"id"`
|
ID int64 `json:"id"`
|
||||||
TargetBranch string `json:"target_branch"`
|
TargetBranch string `json:"target_branch"`
|
||||||
SourceBranch string `json:"source_branch"`
|
SourceBranch string `json:"source_branch"`
|
||||||
SourceProjectID string `json:"source_project_id"`
|
SourceProjectID string `json:"source_project_id"`
|
||||||
AssigneeID int `json:"assignee_id"`
|
AssigneeID int64 `json:"assignee_id"`
|
||||||
AuthorID int `json:"author_id"`
|
AuthorID int64 `json:"author_id"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
CreatedAt customTime `json:"created_at"`
|
CreatedAt customTime `json:"created_at"`
|
||||||
UpdatedAt customTime `json:"updated_at"`
|
UpdatedAt customTime `json:"updated_at"`
|
||||||
MilestoneID int `json:"milestone_id"`
|
MilestoneID int64 `json:"milestone_id"`
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
MergeStatus string `json:"merge_status"`
|
MergeStatus string `json:"merge_status"`
|
||||||
TargetProjectID int `json:"target_project_id"`
|
TargetProjectID int64 `json:"target_project_id"`
|
||||||
IID int `json:"iid"`
|
IID int64 `json:"iid"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
Position int `json:"position"`
|
Position int64 `json:"position"`
|
||||||
LockedAt customTime `json:"locked_at"`
|
LockedAt customTime `json:"locked_at"`
|
||||||
Source Source `json:"source"`
|
Source Source `json:"source"`
|
||||||
Target Target `json:"target"`
|
Target Target `json:"target"`
|
||||||
@@ -361,7 +361,7 @@ type Source struct {
|
|||||||
GitSSHURL string `json:"git_ssh_url"`
|
GitSSHURL string `json:"git_ssh_url"`
|
||||||
GitHTTPURL string `json:"git_http_url"`
|
GitHTTPURL string `json:"git_http_url"`
|
||||||
Namespace string `json:"namespace"`
|
Namespace string `json:"namespace"`
|
||||||
VisibilityLevel int `json:"visibility_level"`
|
VisibilityLevel int64 `json:"visibility_level"`
|
||||||
PathWithNamespace string `json:"path_with_namespace"`
|
PathWithNamespace string `json:"path_with_namespace"`
|
||||||
DefaultBranch string `json:"default_branch"`
|
DefaultBranch string `json:"default_branch"`
|
||||||
Homepage string `json:"homepage"`
|
Homepage string `json:"homepage"`
|
||||||
@@ -379,7 +379,7 @@ type Target struct {
|
|||||||
GitSSHURL string `json:"git_ssh_url"`
|
GitSSHURL string `json:"git_ssh_url"`
|
||||||
GitHTTPURL string `json:"git_http_url"`
|
GitHTTPURL string `json:"git_http_url"`
|
||||||
Namespace string `json:"namespace"`
|
Namespace string `json:"namespace"`
|
||||||
VisibilityLevel int `json:"visibility_level"`
|
VisibilityLevel int64 `json:"visibility_level"`
|
||||||
PathWithNamespace string `json:"path_with_namespace"`
|
PathWithNamespace string `json:"path_with_namespace"`
|
||||||
DefaultBranch string `json:"default_branch"`
|
DefaultBranch string `json:"default_branch"`
|
||||||
Homepage string `json:"homepage"`
|
Homepage string `json:"homepage"`
|
||||||
|
|||||||
Reference in New Issue
Block a user