We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81a3d70 commit ac1d99cCopy full SHA for ac1d99c
1 file changed
src/secret-scanning/scripts/sync.ts
@@ -7,8 +7,9 @@
7
* https://github.com/github/token-scanning-service/blob/main/docs/public-docs
8
* directory to src/secret-scanning/data/pattern-docs
9
*/
10
-import { writeFile } from 'fs/promises'
+import { writeFile, mkdir } from 'fs/promises'
11
import yaml from 'js-yaml'
12
+import path from 'path'
13
14
import { getDirectoryContents } from '@/workflows/git-utils'
15
import schema from '@/secret-scanning/data/public-docs-schema'
@@ -52,6 +53,7 @@ async function main() {
52
53
const filePath = file.path.replace(`${directory}/`, '')
54
const localFilePath = `${SECRET_SCANNING_DIR}/${filePath}`
55
56
+ await mkdir(path.dirname(localFilePath), { recursive: true })
57
await writeFile(localFilePath, yaml.dump(yamlData))
58
}
59
0 commit comments