(projectId: string, repoUrl: string)
| 17 | } |
| 18 | |
| 19 | export async function setProjectOrigin(projectId: string, repoUrl: string) { |
| 20 | if (!(await isGitRepository(projectId))) { |
| 21 | return |
| 22 | } |
| 23 | |
| 24 | const currentOriginUrl = await getOriginUrl(projectId) |
| 25 | |
| 26 | if (currentOriginUrl) { |
| 27 | await runGit(projectId, ['remote', 'set-url', 'origin', repoUrl]) |
| 28 | return |
| 29 | } |
| 30 | |
| 31 | await runGit(projectId, ['remote', 'add', 'origin', repoUrl]) |
| 32 | } |
| 33 | |
| 34 | export async function commitProjectChanges( |
| 35 | projectId: string, |
no test coverage detected