zorkian / go-datadog-api

A Go implementation of the Datadog API.
BSD 3-Clause "New" or "Revised" License
183 stars 156 forks source link

Add Webhooks Integration support #265

Closed krish7919 closed 4 years ago

krish7919 commented 5 years ago

This PR adds support for Webhooks Integration to the library.

Integration Tests:

$ export DATADOG_API_KEY="XXX"
$ export DATADOG_APP_KEY="YYY"

$ make testacc TESTARGS='-run=TestIntegrationWebhookCreateAndDelete'
go test integration/* -v -run=TestIntegrationWebhookCreateAndDelete -timeout 90m
=== RUN   TestIntegrationWebhookCreateAndDelete
--- PASS: TestIntegrationWebhookCreateAndDelete (1.39s)
PASS
ok      command-line-arguments  (cached)

$ make testacc TESTARGS='-run=TestIntegrationWebhookUpdate'
go test integration/* -v -run=TestIntegrationWebhookUpdate -timeout 90m
=== RUN   TestIntegrationWebhookUpdate
--- PASS: TestIntegrationWebhookUpdate (1.61s)
PASS
ok      command-line-arguments  (cached)

$ make testacc TESTARGS='-run=TestIntegrationWebhookGet'
go test integration/* -v -run=TestIntegrationWebhookGet -timeout 90m
=== RUN   TestIntegrationWebhookGet
--- PASS: TestIntegrationWebhookGet (1.17s)
PASS
ok      command-line-arguments  (cached)
dabcoder commented 5 years ago

Thanks for this submission @krish7919. Tests are failing because you need to run make generate to generate accessors for the new struct you're adding (see https://github.com/zorkian/go-datadog-api#regenerating-code), then add the generated code in datadog-accessors.go to this PR. Can you do that please? Thanks in advance.

krish7919 commented 5 years ago

@dabcoder Done!

krish7919 commented 5 years ago

All tests are green now!

krish7919 commented 5 years ago

Who merges this now, @zorkian ?

dabcoder commented 5 years ago

@krish7919 we (Datadog) can review your PR, bear with us and sorry for the delay in getting back to you on this one. Thanks for your work there, will update this thread soon.

bkabrda commented 4 years ago

Hey, this looks real good. Could you please rebase this (there are conflicting files ATM), so that I could test locally and then merge? Thanks!

krish7919 commented 4 years ago

@bkabrda Done!

bkabrda commented 4 years ago

@krish7919 hey, are you still interested in working on this? If not, do you mind if I take it over?

krish7919 commented 4 years ago

Sorry, I got busy. Yes, you can take it over.

Best, Krish

On Fri, 22 Nov 2019 at 14:59, Slavek Kabrda notifications@github.com wrote:

@krish7919 https://github.com/krish7919 hey, are you still interested in working on this? If not, do you mind if I take it over?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zorkian/go-datadog-api/pull/265?email_source=notifications&email_token=ABGVBKQJ46KB7RYOXOKGPZ3QU7QULA5CNFSM4IO4U3QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE5WVHI#issuecomment-557542045, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGVBKT5FRAAGISN3UXPH63QU7QULANCNFSM4IO4U3QA .

-- Thumb typed mail

bewie commented 4 years ago

Any updates on this ?

krish7919 commented 4 years ago

Thanks, I will fix the comments right away, got a few mins....

krish7919 commented 4 years ago

Bump....

dabcoder commented 4 years ago

@krish7919 looks like tests are failing due to the same reason as the one I mentioned here: https://github.com/zorkian/go-datadog-api/pull/265#issuecomment-524766843. Mind running make generate again and committing the edited accessors file? Thanks.

bkabrda commented 4 years ago

I'm going to close this and merge #300 instead to get the feature in. @krish7919 your commit from this PR is preserved in #300 and so your contribution will still be attributed to you. Thanks so much for sending the PR!

krish7919 commented 4 years ago

Thanks, @bkabrda :)