Browse Source

s/assign/assignments/

pull/131/head
Kegan Dougal 8 years ago
parent
commit
aec58233d9
  1. 2
      src/github.com/matrix-org/go-neb/services/github/github_webhook.go
  2. 2
      src/github.com/matrix-org/go-neb/services/github/webhook/webhook.go
  3. 2
      src/github.com/matrix-org/go-neb/services/github/webhook/webhook_test.go

2
src/github.com/matrix-org/go-neb/services/github/github_webhook.go

@ -62,7 +62,7 @@ type WebhookService struct {
// pull_request_review_comment : When a line comment is made on a pull request. // pull_request_review_comment : When a line comment is made on a pull request.
// labels : When any issue or pull request is labeled/unlabeled. Unique to Go-NEB. // labels : When any issue or pull request is labeled/unlabeled. Unique to Go-NEB.
// milestones : When any issue or pull request is milestoned/demilestoned. Unique to Go-NEB. // milestones : When any issue or pull request is milestoned/demilestoned. Unique to Go-NEB.
// assign : When any issue or pull request is assigned/unassigned. Unique to Go-NEB.
// assignments : When any issue or pull request is assigned/unassigned. Unique to Go-NEB.
// Most of these events are directly from: https://developer.github.com/webhooks/#events // Most of these events are directly from: https://developer.github.com/webhooks/#events
Events []string Events []string
} }

2
src/github.com/matrix-org/go-neb/services/github/webhook/webhook.go

@ -135,7 +135,7 @@ func refineEventType(eventType string, action *string) string {
} }
a := *action a := *action
if a == "assigned" || a == "unassigned" { if a == "assigned" || a == "unassigned" {
return "assign"
return "assignments"
} else if a == "milestoned" || a == "demilestoned" { } else if a == "milestoned" || a == "demilestoned" {
return "milestones" return "milestones"
} else if a == "labeled" || a == "unlabeled" { } else if a == "labeled" || a == "unlabeled" {

2
src/github.com/matrix-org/go-neb/services/github/webhook/webhook_test.go

@ -1033,7 +1033,7 @@ var ghtests = []struct {
} }
}`, }`,
"[<u>matrix-org/matrix-react-sdk</u>] richvdh assigned <b>pull request #303</b>: Factor out common parts of room creation [open] to dbkr - https://github.com/matrix-org/matrix-react-sdk/pull/303", "[<u>matrix-org/matrix-react-sdk</u>] richvdh assigned <b>pull request #303</b>: Factor out common parts of room creation [open] to dbkr - https://github.com/matrix-org/matrix-react-sdk/pull/303",
"matrix-org/matrix-react-sdk", "assign",
"matrix-org/matrix-react-sdk", "assignments",
}, },
// ================================================================== // ==================================================================
{ {

Loading…
Cancel
Save