(url: string)
| 1075 | } |
| 1076 | |
| 1077 | async addRemote(url: string) { |
| 1078 | console.log(`[git] Add Remote url=${url}`); |
| 1079 | await git.addRemote({ |
| 1080 | ...this._baseOpts, |
| 1081 | remote: 'origin', |
| 1082 | url, |
| 1083 | force: true, |
| 1084 | }); |
| 1085 | const config = await this.getRemote('origin'); |
| 1086 | |
| 1087 | if (config === null) { |
| 1088 | throw new Error('Remote not found remote=origin'); |
| 1089 | } |
| 1090 | |
| 1091 | return config; |
| 1092 | } |
| 1093 | |
| 1094 | async listRemotes(): Promise<GitRemoteConfig[]> { |
| 1095 | return git.listRemotes({ ...this._baseOpts }); |
no test coverage detected