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

feat: Add Push Webhook provider #3266

Merged
merged 19 commits into from
May 4, 2023

Conversation

TNAJanssen
Copy link
Contributor

What change does this PR introduce?

Added Webhooks as a push provider.

Why was this change needed?

Closed #3265

Other information (Screenshots)

Added tests as well

@TNAJanssen
Copy link
Contributor Author

@p-fernandez do you think this provider can be released with the next release?

Copy link
Contributor

@jlucidar jlucidar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great to me as it looks the same as the PR #3244 for email webhook provider.
A good step towards #2958 !

@TNAJanssen
Copy link
Contributor Author

@scopsy can you check this one out as well?

@@ -41,4 +41,6 @@ export class CredentialsDto {
ignoreTls?: boolean;
@ApiPropertyOptional()
tlsOptions?: Record<string, unknown>;
@ApiPropertyOptional()
baseUrl?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find baseUrl could be a bit confusing. And as it is a specific credential property added for this feature what do you think of naming it pushWebhookUrl? I was going to suggest webhookUrl in case we wanted in the future something similar with the other channels, but not sure if that's a direction we will want to take.
@scopsy your thoughts about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i used the same as the other webhook proposal. I can change it to whatever you prefer :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@p-fernandez iirc, I think it was listed as a credential property somewhere but not totally implemented. (this is why i used this property naming but could rename it to whatever you want btw)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to the already existing webhookUrl

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I realised that baseUrl is used for other purposes for the providers (for example when the provider needs to set a certain URL depending on the account / API key). So I think this change is a good one. 👍🏻

providers/push-webhook/README.md Outdated Show resolved Hide resolved
providers/push-webhook/README.md Outdated Show resolved Hide resolved
providers/push-webhook/package.json Outdated Show resolved Hide resolved
providers/push-webhook/package.json Show resolved Hide resolved
providers/push-webhook/src/lib/push-webhook.provider.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@p-fernandez p-fernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small bug but we are ready to go in my opinion. 👍🏻

@@ -41,4 +41,6 @@ export class CredentialsDto {
ignoreTls?: boolean;
@ApiPropertyOptional()
tlsOptions?: Record<string, unknown>;
@ApiPropertyOptional()
baseUrl?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I realised that baseUrl is used for other purposes for the providers (for example when the provider needs to set a certain URL depending on the account / API key). So I think this change is a good one. 👍🏻

providers/push-webhook/README.md Show resolved Hide resolved
jlucidar pushed a commit to jlucidar/novu that referenced this pull request May 3, 2023
…webhook.handler.ts

Co-authored-by: Pablo Fernández <pablo@novu.co>
@TNAJanssen
Copy link
Contributor Author

@p-fernandez good catch! Thanks :)

Co-authored-by: Pablo Fernández <pablo@novu.co>
@p-fernandez p-fernandez added this pull request to the merge queue May 4, 2023
Merged via the queue into novuhq:next with commit 4725db3 May 4, 2023
29 of 32 checks passed
@TNAJanssen TNAJanssen deleted the feature/webhook-push-provider branch May 4, 2023 13:28
@zlanich
Copy link

zlanich commented May 4, 2023

Is this for Push only? If so, is there a reason we aren't doing it for the other channels? Thank you!

@p-fernandez
Copy link
Contributor

Is this for Push only? If so, is there a reason we aren't doing it for the other channels? Thank you!

There is work ongoing for Email webhook provider here: #3244

@zlanich
Copy link

zlanich commented May 4, 2023

@p-fernandez Thank you!

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

Successfully merging this pull request may close these issues.

[NV-2157] 🚀 Feature: Push Webhook integration
4 participants