File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const markdownTranslate = require ( '@orta/markdown-translator' )
2- import { danger , message } from "danger"
2+ import { danger , markdown } from "danger"
33
44const go = async ( ) => {
55 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+
77
88 for ( const file of allMDFiles ) {
99 const fileContents = await danger . github . utils . fileContents ( file )
@@ -17,7 +17,12 @@ const go = async () => {
1717 region : "eastus"
1818 } )
1919
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>` )
2126 } ;
2227}
2328
You can’t perform that action at this time.
0 commit comments