Skip to content

Feature/solution actions #38

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 6 commits into from
Sep 29, 2019
Next Next commit
add editor solution actions
  • Loading branch information
ShMcK committed Sep 28, 2019
commit f9660fda5db9eeca5c880bc512fd5ea67826a910
18 changes: 6 additions & 12 deletions src/actions/solutionActions.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
// import * as CR from 'typings'
import * as G from 'typings/graphql'
// import {TutorialModel} from '../services/tutorial'
// import {gitLoadCommits, gitClear} from '../services/git'

const solutionActions = async (stepActions: G.StepActions): Promise<void> => {
// TODO: should load same as commits

// const step: G.Step = tutorialModel.step()
// const solution = step.solution

// await gitClear()
// await gitLoadCommits(solution, dispatch)
import * as vscode from 'vscode'
import * as git from '../services/git'
import setupActions from './setupActions'

const solutionActions = async (workspaceRoot: vscode.WorkspaceFolder, stepActions: G.StepActions): Promise<void> => {
await git.clear()
setupActions(workspaceRoot, stepActions)
}

export default solutionActions
2 changes: 1 addition & 1 deletion src/channel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class Channel implements Channel {
return
// load solution step actions (git commits, commands, open files)
case 'SOLUTION_ACTIONS':
solutionActions(action.payload)
solutionActions(this.workspaceRoot, action.payload)
return

default:
Expand Down