Skip to content
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

fix(1769): add sendWebhooks #39

Merged
merged 2 commits into from
Dec 13, 2021
Merged

Conversation

wahapo
Copy link
Contributor

@wahapo wahapo commented Dec 9, 2021

Context

We modified it last time to store a queue. I implement a worker that takes that queue and requests the API.

Objective

Post what is received in the queue to the API

  1. Receive json format string from queue.
    '{"foo": "bar"}'
    
  2. Post the json received in the queue to the API with the bearer token.
    curl -X POST -H 'Authorization: Bearer dummy' -d '{"foo": "bar"}' ${apiUri}/v4/processHooks
    

References

screwdriver-cd/screwdriver#1769 (comment)

The /v4/processHooks API that we will create later response should return only 200, 201, 204. If we need another status code when we implement the API, we can adjust it!
https://github.com/screwdriver-cd/screwdriver/blob/master/plugins/webhooks/index.js

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@wahapo wahapo marked this pull request as ready for review December 10, 2021 08:14
@itleigns
Copy link
Contributor

itleigns commented Dec 10, 2021

Please add the queue which the worker pulls from here.

@wahapo
Copy link
Contributor Author

wahapo commented Dec 13, 2021

@tkyi The review in YJ is now complete, would you please merge this PR? Thanks!

@tkyi tkyi merged commit 9e873c2 into screwdriver-cd:master Dec 13, 2021
@wahapo wahapo deleted the 1769 branch December 14, 2021 00:47
@wahapo
Copy link
Contributor Author

wahapo commented Dec 14, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants