1
1
import { execSync } from "child_process"
2
- import fs , { readFileSync , unlinkSync , writeFileSync } from "fs"
2
+ import fs , { unlinkSync , writeFileSync } from "fs"
3
3
import path from "path"
4
4
import { Readable } from "stream"
5
5
import { finished } from "stream/promises"
@@ -9,9 +9,6 @@ import decompress from "decompress"
9
9
10
10
import { INTL_JSON_DIR , TRANSLATIONS_DIR } from "../../../lib/constants"
11
11
12
- import { SUMMARY_PATH } from "./constants"
13
- import { QASummary } from "./types"
14
-
15
12
export const downloadFile = async ( url : string , writePath : string ) => {
16
13
// Get directory from writePath and ensure it exists
17
14
const dir = writePath . substring ( 0 , writePath . lastIndexOf ( "/" ) )
@@ -40,33 +37,6 @@ export const decompressFile = async (filePath: string, targetDir: string) => {
40
37
console . log ( "✅ Decompression complete." )
41
38
}
42
39
43
- const getQAMessage = ( locale : string ) => {
44
- console . log ( "Checking summary path:" , SUMMARY_PATH )
45
- if ( ! fs . existsSync ( SUMMARY_PATH ) ) {
46
- console . error ( "Could not find summary path:" , SUMMARY_PATH )
47
- throw new Error ( "No summary file found." )
48
- }
49
-
50
- const summaryJson : QASummary = JSON . parse ( readFileSync ( SUMMARY_PATH , "utf-8" ) )
51
- const qaResults = summaryJson [ locale ]
52
- ? summaryJson [ locale ] . map ( ( s ) => "- " + s ) . join ( "\n" )
53
- : null
54
-
55
- if ( ! qaResults ) return "No QA issues found"
56
- return `
57
- \`\`\`shell
58
- yarn markdown-checker
59
- \`\`\`
60
-
61
- <details><summary>Unfold for ${ summaryJson [ locale ] . length } result(s)</summary>
62
-
63
- ${ qaResults }
64
- </details>
65
-
66
- @coderabbitai review
67
- `
68
- }
69
-
70
40
export const createLocaleTranslationPR = (
71
41
locale : string ,
72
42
buckets : number [ ]
@@ -101,9 +71,6 @@ export const createLocaleTranslationPR = (
101
71
102
72
## Content buckets imported
103
73
${ buckets . sort ( ( a , b ) => a - b ) . join ( ", " ) }
104
-
105
- ## Markdown QA checker alerts
106
- ${ getQAMessage ( locale ) }
107
74
`
108
75
109
76
const bodyWritePath = path . resolve ( process . cwd ( ) , "body.txt" )
0 commit comments