-
Notifications
You must be signed in to change notification settings - Fork 104
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
Webhook behavior customization and delivery records #1338
Conversation
WebhookSubscription defines the Webhook behavior WebhookDelivery stores historical data about deliveries Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updates look good and I'm able to use the new webhook subscriptions, but I'm running into a problem with authentication when sending the results back to purldb.
|
||
logger.info(f"Sending Webhook uuid={self.uuid}.") | ||
try: | ||
response = requests.post( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am having trouble sending the project results back to purldb because the authentication token is not used here.
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
Signed-off-by: tdruez <tdruez@nexb.com>
This PR expands on the existing WebhookSubscription model by adding a few fields to configure the behavior of the Webhook, and moving some of the fields to a new WebhookDelivery model, which captures the results of a WebhookSubscription "delivery".
@JonoYang Could you give it a try and see if the current addition would work for your needs in the context of the PurlDB workers?
For example, adding a Webhook from the code:
Also available using the API: