MCPcopy Create free account
hub / github.com/decaporg/decap-cms / initRepo

Function initRepo

cypress/plugins/proxy.js:9–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7const { getGitClient } = require('./common');
8
9const initRepo = async dir => {
10 await fs.remove(dir);
11 await fs.mkdirp(dir);
12 const git = getGitClient(dir);
13 await git.init({ '--initial-branch': 'main' });
14 await git.addConfig('user.email', 'cms-cypress-test@netlify.com');
15 await git.addConfig('user.name', 'cms-cypress-test');
16
17 const readme = 'README.md';
18 await fs.writeFile(path.join(dir, readme), '');
19 await git.add(readme);
20 await git.commit('initial commit', readme, { '--no-verify': true, '--no-gpg-sign': true });
21};
22
23const startServer = async (repoDir, mode) => {
24 const tsNode = path.join(__dirname, '..', '..', 'node_modules', '.bin', 'ts-node');

Callers 1

setupProxyTestFunction · 0.85

Calls 2

getGitClientFunction · 0.85
commitMethod · 0.45

Tested by

no test coverage detected