MCPcopy Create free account
hub / github.com/conventional-changelog/commitlint / commitFile

Function commitFile

@commitlint/read/src/read.test.ts:241–247  ·  view source on GitHub ↗
(cwd: string, file: string, message: string, content = file)

Source from the content-addressed store, hash-verified

239});
240
241async function commitFile(cwd: string, file: string, message: string, content = file) {
242 const fullPath = path.join(cwd, file);
243 await fs.mkdir(path.dirname(fullPath), { recursive: true });
244 await fs.writeFile(fullPath, content);
245 await x("git", ["add", "--", file], { nodeOptions: { cwd } });
246 await x("git", ["commit", "-m", message], { nodeOptions: { cwd } });
247}
248
249test("filters history commits by a single path", async () => {
250 const cwd: string = await git.bootstrap();

Callers 1

read.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected