File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,21 @@ async function commit(params) {
5757 }
5858
5959 const prefix = ! ! destinationFolder ? `${ destinationFolder } /` : '' ;
60- const path = `${ prefix } problems/${ name } /solution.md` // Markdown file for the problem with the solution at the end
60+ const questionPath = `${ prefix } problems/${ name } /question.md` ; // Markdown file for the problem with question data
61+ const solutionPath = `${ prefix } problems/${ name } /solution.${ LANG_TO_EXTENSION [ submission . lang ] } ` ; // Separate file for the solution
62+
6163
6264 const treeData = [
6365 {
64- path,
66+ path : questionPath ,
6567 mode : '100644' ,
66- content : question_data + '\n \n ' + '# Solution' + '\n' + '```' + submission . lang + ' \n' + submission . code + '\n' + '```' ,
67- }
68+ content : question_data ,
69+ } ,
70+ {
71+ path : solutionPath ,
72+ mode : '100644' ,
73+ content : submission . code ,
74+ } ,
6875 ] ;
6976
7077 const treeResponse = await octokit . git . createTree ( {
You can’t perform that action at this time.
0 commit comments