Skip to content

Refactor #441

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 4 commits into from
Aug 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

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
save progress with stepId
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed Aug 9, 2020
commit e64b473a1c099242c0d4ed40e82ebaa27ff7ad25
3 changes: 1 addition & 2 deletions src/services/git/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ export async function getCommitMessage(hash: string): Promise<string | null> {

export async function commitsExistsByMessage(message: string): Promise<boolean> {
try {
// returns an list of commit hashes
// note: may not work with quotes in message
// returns a list of commit hashes
const { stdout, stderr } = await exec({ command: `git log -g --grep='${message}'` })
if (stderr) {
return false
Expand Down
2 changes: 1 addition & 1 deletion src/services/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const onError = async (error: Error): Promise<void> => {
}

export const onStepComplete = async ({ levelId, stepId }: { levelId: string; stepId: string }): Promise<void> => {
git.saveCommit('Save progress')
git.saveCommit(`Save progress: ${stepId}`)
logger(`ON STEP COMPLETE: ${JSON.stringify({ levelId, stepId })}`)
}

Expand Down
2 changes: 1 addition & 1 deletion web-app/src/services/state/actions/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default (editorSend: any) => ({
type: 'EDITOR_STEP_COMPLETE',
payload: {
levelId: context.position.levelId,
stepId: context.position.levelId,
stepId: context.position.stepId,
},
})
},
Expand Down