-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webhooks V3 Support #367
Comments
If someone were to raise a PR, and be willing to address any feedback, that would probably be appreciated. I do not have the capability to merge my own PRs, but I can merge others, so I'm sort of reluctant to raise another PR that'll just sit for months... Right now #326 is blocked pending requested changes, so it'll land in v1.5.0 if those are resolved. |
From a comment I made here (#370 (comment)):
That said, maybe we could accomplish it with something like this where there is a struct type with a method to access each potential payload data type. Consumers can use the type Payload struct {
Event Event `json:"event"`
}
type Event struct {
ID string
EventType EventType
Data Data
}
type EventType string
const (
Incident EventType = "incident"
IncidentNote EventType = "incident_note"
)
type Data struct {
eventType EventType
// not sure what else yet...
}
// Incident returns the incident data from the payload. The bool return
// value will be true if data was incident data.
func (p Payload) Incident() (Incident, bool) {
if p.eventType != Incident {
return Incident{}, false
}
return // p.something...
}
func (p Payload) IncidentNote() (IncidentNote, bool) { } |
Can't commit any sort of time frame but I am slowly working on this. |
@ChezCrawford I've managed to get everything else for |
It's in the works but isn't quite ready for use. I'll shoot for something in v1.6.0. |
Guys, any updates? @ChezCrawford |
So the one thing I am unsure of is how PagerDuty defines "deprecated". Whenever I've seen deprecated used elsewhere, it means things will keep working but it's either no longer the default option or it's no longer an option for new configurations. If we assume the same is true for PD there isn't much of a risk for people who currently use Webhooks, but it could be slightly inconvenient for anyone trying to set up new ones. Considering that, we should definitely get this into a release before the end of March. End of February might be more ideal date to aim for. Edit: I have confirmed with PagerDuty that things will keep working when they are deprecated, but there will just be no support available:
|
Alright two threads here: First, i've got a draft of some basic support for V3 Webhook Payloads in #427 and would appreciate and/all feedback. Second: My apologies for the delay in communication regarding deprecation; this is has been a bit of a mess from our end. What @theckman said above is essentially correct. Furthermore: be on the lookout for some updated communication regarding webhook deprecation. We are going to do our best not to leave anyone out in the cold 😉 . |
As V1/V2 webhooks are being deprecated, are there plans to support V3 webhooks within
go-pagerduty
?I've seen that #326 adds signature verification and should land in v1.5.0?
But the payload also seems to change between V2 and V3.
The text was updated successfully, but these errors were encountered: