Skip to content

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

Merged
merged 5 commits into from
Oct 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove unnecessary version
Signed-off-by: shmck <[email protected]>
  • Loading branch information
ShMcK committed Aug 29, 2021
commit 2eb1c0a76059ddc8bf538466cebac6a934fa01e9
6 changes: 1 addition & 5 deletions src/services/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const onInit = async (actions: TT.StepActions): Promise<void> => {
await runVSCodeCommands(actions?.vscodeCommands)
webhooks.onInit({
// tutorialId,
version: VERSION,
coderoadVersion: VERSION,
})
}

Expand Down Expand Up @@ -53,7 +53,6 @@ export const onReset = async (actions: TT.StepActions): Promise<void> => {
await runVSCodeCommands(actions?.vscodeCommands)
webhooks.onReset({
// tutorialId,
version: VERSION,
})
}

Expand All @@ -76,7 +75,6 @@ export const onStepComplete = async ({
telemetry.onEvent('step_complete', { tutorialId, stepId, levelId, version: VERSION })
webhooks.onStepComplete({
tutorialId,
version: VERSION,
levelId,
stepId,
})
Expand All @@ -93,7 +91,6 @@ export const onLevelComplete = async ({
telemetry.onEvent('level_complete', { tutorialId, levelId, version: VERSION })
webhooks.onLevelComplete({
tutorialId,
version: VERSION,
levelId,
})
}
Expand All @@ -103,6 +100,5 @@ export const onTutorialComplete = async ({ tutorialId }: { tutorialId: string })
telemetry.onEvent('tutorial_complete', { tutorialId, version: VERSION })
webhooks.onTutorialComplete({
tutorialId,
version: VERSION,
})
}
3 changes: 1 addition & 2 deletions src/services/hooks/webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const callWebhookEndpoint = async <B>(bodyObject: B): Promise<void> => {

type InitEvent = {
// tutorialId: string;
version: string
coderoadVersion: string
}

export const onInit = (event: InitEvent): void => {
Expand All @@ -39,7 +39,6 @@ export const onInit = (event: InitEvent): void => {

type ResetEvent = {
// tutorialId: string;
version: string
}

export const onReset = (event: ResetEvent): void => {
Expand Down