- Notifications
You must be signed in to change notification settings - Fork39
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
Signed-off-by: shmck <shawn.j.mckay@gmail.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.
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.
typeWebhookEevntTutorialComplete={tutorialId:string;version:string} | |
exportconstonTutorialComplete=(event:WebhookEevntTutorialComplete):void=>{ | |
if(WEBHOOK_EVENTS.tutorial_complete){ | |
callWebhookEndpoint<WebhookEevntTutorialComplete>(event) | |
} | |
} | |
typeWebhookEventTutorialComplete={tutorialId:string;version?:string} | |
exportconstonTutorialComplete=(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 theversion?
. 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.
typeWebhookEventLevelComplete={tutorialId:string;version:string;levelId:string} | |
typeWebhookEventLevelComplete={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.
typeWebhookEventStepComplete={tutorialId:string;version:string;levelId:string;stepId:string} | |
typeWebhookEventStepComplete={tutorialId:string;version?:string;levelId:string;stepId:string} |
Webhook API for coderoad.
Signed-off-by: shmckshawn.j.mckay@gmail.com