-
Notifications
You must be signed in to change notification settings - Fork 38
WIP: webhook demo #508
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
WIP: webhook demo #508
Conversation
Signed-off-by: shmck <[email protected]>
Signed-off-by: shmck <[email protected]>
Signed-off-by: shmck <[email protected]>
Signed-off-by: shmck <[email protected]>
Signed-off-by: shmck <[email protected]>
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.
This seems to be working on my testing - nice job @ShMcK 👍
Left a few suggestions.
Edit: Wondering what happens if the request doesn't go through. At the moment, I only plan on having an event for completing an entire tutorial, which would send one request at the end. If it doesn't go through, users would have to do the whole tutorial again. It's unlikely the request won't go through, but maybe some way to verify that the request made it, and if not, a way to resend. I don't think that's needed for now, just thinking out loud.
type WebhookEevntTutorialComplete = { tutorialId: string; version: string } | ||
|
||
export const onTutorialComplete = (event: WebhookEevntTutorialComplete): void => { | ||
if (WEBHOOK_EVENTS.tutorial_complete) { | ||
callWebhookEndpoint<WebhookEevntTutorialComplete>(event) | ||
} | ||
} |
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.
type WebhookEevntTutorialComplete = { tutorialId: string; version: string } | |
export const onTutorialComplete = (event: WebhookEevntTutorialComplete): void => { | |
if (WEBHOOK_EVENTS.tutorial_complete) { | |
callWebhookEndpoint<WebhookEevntTutorialComplete>(event) | |
} | |
} | |
type WebhookEventTutorialComplete = { tutorialId: string; version?: string } | |
export const onTutorialComplete = (event: WebhookEventTutorialComplete): void => { | |
if (WEBHOOK_EVENTS.tutorial_complete) { | |
callWebhookEndpoint<WebhookEventTutorialComplete>(event) | |
} | |
} |
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.
Sounds good, I'll merge for now with the note that it may require more of a guarantee.
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.
Pretty sure I was just having issues running the extension without the ?
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 published version has the version?
. I added it in a separate PR.
@moT01 can you post an issue if you have any more details?
} | ||
} | ||
|
||
type WebhookEventLevelComplete = { tutorialId: string; version: string; levelId: string } |
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.
type WebhookEventLevelComplete = { tutorialId: string; version: string; levelId: string } | |
type WebhookEventLevelComplete = { tutorialId: string; version?: string; levelId: string } |
} | ||
} | ||
|
||
type WebhookEventStepComplete = { tutorialId: string; version: string; levelId: string; stepId: string } |
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.
type WebhookEventStepComplete = { tutorialId: string; version: string; levelId: string; stepId: string } | |
type WebhookEventStepComplete = { tutorialId: string; version?: string; levelId: string; stepId: string } |
Webhook API for coderoad.
Signed-off-by: shmck [email protected]