Address PR comments and merge conflicts

This commit is contained in:
Jack Zampolin
2016-01-25 09:56:57 -08:00
parent 89f5b77550
commit 4e5dfa5d33
11 changed files with 4932 additions and 84 deletions

View File

@@ -1,8 +1,6 @@
package models
type Mock struct{}
func (_ Mock) CommitCommentEventJSON() string {
func CommitCommentEventJSON() string {
return `{
"action": "created",
"comment": {
@@ -145,7 +143,7 @@ func (_ Mock) CommitCommentEventJSON() string {
}`
}
func (_ Mock) CreateEventJSON() string {
func CreateEventJSON() string {
return `{
"ref": "0.0.1",
"ref_type": "tag",
@@ -261,7 +259,7 @@ func (_ Mock) CreateEventJSON() string {
}`
}
func (_ Mock) DeleteEventJSON() string {
func DeleteEventJSON() string {
return `{
"ref": "simple-tag",
"ref_type": "tag",
@@ -375,7 +373,7 @@ func (_ Mock) DeleteEventJSON() string {
}`
}
func (_ Mock) DeploymentEventJSON() string {
func DeploymentEventJSON() string {
return `{
"deployment": {
"url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692",
@@ -520,7 +518,7 @@ func (_ Mock) DeploymentEventJSON() string {
}`
}
func (_ Mock) DeploymentStatusEventJSON() string {
func DeploymentStatusEventJSON() string {
return `{
"deployment": {
"url": "https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692",
@@ -696,7 +694,7 @@ func (_ Mock) DeploymentStatusEventJSON() string {
`
}
func (_ Mock) ForkEventJSON() string {
func ForkEventJSON() string {
return `{
"forkee": {
"id": 35129393,
@@ -895,7 +893,7 @@ func (_ Mock) ForkEventJSON() string {
}`
}
func (_ Mock) GollumEventJSON() string {
func GollumEventJSON() string {
return `{
"pages": [
{
@@ -1016,7 +1014,7 @@ func (_ Mock) GollumEventJSON() string {
}`
}
func (_ Mock) IssueCommentEventJSON() string {
func IssueCommentEventJSON() string {
return `{
"action": "created",
"issue": {
@@ -1201,7 +1199,7 @@ func (_ Mock) IssueCommentEventJSON() string {
}`
}
func (_ Mock) IssuesEventJSON() string {
func IssuesEventJSON() string {
return `{
"action": "opened",
"issue": {
@@ -1358,7 +1356,7 @@ func (_ Mock) IssuesEventJSON() string {
}`
}
func (_ Mock) MemberEventJSON() string {
func MemberEventJSON() string {
return `{
"action": "added",
"member": {
@@ -1489,7 +1487,7 @@ func (_ Mock) MemberEventJSON() string {
}`
}
func (_ Mock) MembershipEventJSON() string {
func MembershipEventJSON() string {
return `{
"action": "added",
"scope": "team",
@@ -1553,7 +1551,7 @@ func (_ Mock) MembershipEventJSON() string {
}`
}
func (_ Mock) PageBuildEventJSON() string {
func PageBuildEventJSON() string {
return `{
"id": 15995382,
"build": {
@@ -1695,7 +1693,7 @@ func (_ Mock) PageBuildEventJSON() string {
}`
}
func (_ Mock) PublicEventJSON() string {
func PublicEventJSON() string {
return `{
"repository": {
"id": 35129377,
@@ -1806,7 +1804,7 @@ func (_ Mock) PublicEventJSON() string {
}`
}
func (_ Mock) PullRequestReviewCommentEventJSON() string {
func PullRequestReviewCommentEventJSON() string {
return `{
"action": "created",
"comment": {
@@ -2255,7 +2253,7 @@ func (_ Mock) PullRequestReviewCommentEventJSON() string {
}`
}
func (_ Mock) PullRequestEventJSON() string {
func PullRequestEventJSON() string {
return `{
"action": "opened",
"number": 1,
@@ -2670,7 +2668,7 @@ func (_ Mock) PullRequestEventJSON() string {
}`
}
func (_ Mock) PushEventJSON() string {
func PushEventJSON() string {
return `{
"ref": "refs/heads/changes",
"before": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
@@ -2834,7 +2832,7 @@ func (_ Mock) PushEventJSON() string {
}`
}
func (_ Mock) RepositoryEventJSON() string {
func RepositoryEventJSON() string {
return `{
"action": "created",
"repository": {
@@ -2956,7 +2954,7 @@ func (_ Mock) RepositoryEventJSON() string {
}`
}
func (_ Mock) ReleaseEventJSON() string {
func ReleaseEventJSON() string {
return `{
"action": "published",
"release": {
@@ -3107,7 +3105,7 @@ func (_ Mock) ReleaseEventJSON() string {
}`
}
func (_ Mock) StatusEventJSON() string {
func StatusEventJSON() string {
return `{
"id": 214015194,
"sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
@@ -3316,7 +3314,7 @@ func (_ Mock) StatusEventJSON() string {
}`
}
func (_ Mock) TeamAddEventJSON() string {
func TeamAddEventJSON() string {
return `{
"team": {
"name": "github",
@@ -3448,7 +3446,7 @@ func (_ Mock) TeamAddEventJSON() string {
}`
}
func (_ Mock) WatchEventJSON() string {
func WatchEventJSON() string {
return `{
"action": "started",
"repository": {

View File

@@ -5,14 +5,13 @@ import (
"log"
"time"
"github.com/influxdb/influxdb/client/v2"
"github.com/influxdata/influxdb/client/v2"
)
const meas = "ghWebhooks"
type Event interface {
NewPoint() *client.Point
JSON() string
}
type Repository struct {