(source: string, name: string, content: string)
| 37 | } |
| 38 | |
| 39 | export async function branch(source: string, name: string, content: string) { |
| 40 | await git(source, "checkout", "-b", name) |
| 41 | await fs.writeFile(path.join(source, "README.md"), content) |
| 42 | await git(source, "add", "README.md") |
| 43 | await git(source, "commit", "-m", name) |
| 44 | await git(source, "push", "-u", "origin", name) |
| 45 | } |
| 46 | |
| 47 | export async function git(cwd: string, ...args: string[]) { |
| 48 | await exec("git", args, { cwd }) |
no test coverage detected