File tree 1 file changed +8
-3
lines changed 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
const markdownTranslate = require ( '@orta/markdown-translator' )
2
- import { danger , message } from "danger"
2
+ import { danger , markdown } from "danger"
3
3
4
4
const go = async ( ) => {
5
5
const allMDFiles = [ ...danger . git . modified_files , ...danger . git . created_files ] . filter ( f => f . endsWith ( ".md" ) ) . filter ( f => f . split ( "/" ) . length > 2 )
6
- console . log ( allMDFiles )
6
+
7
7
8
8
for ( const file of allMDFiles ) {
9
9
const fileContents = await danger . github . utils . fileContents ( file )
@@ -17,7 +17,12 @@ const go = async () => {
17
17
region : "eastus"
18
18
} )
19
19
20
- message ( `## Translation of ${ danger . github . utils . fileLinks ( [ file ] ) } \n\n${ translation } ` )
20
+ markdown ( `<details open>
21
+ <summary>Translation of ${ danger . github . utils . fileLinks ( [ file ] ) } </summary>
22
+
23
+ ${ translation }
24
+
25
+ </details>` )
21
26
} ;
22
27
}
23
28
You can’t perform that action at this time.
0 commit comments