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) {
57
57
}
58
58
59
59
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
+
61
63
62
64
const treeData = [
63
65
{
64
- path,
66
+ path : questionPath ,
65
67
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
+ } ,
68
75
] ;
69
76
70
77
const treeResponse = await octokit . git . createTree ( {
You can’t perform that action at this time.
0 commit comments