Create a new GitHub fork of this repository (owner and name)
(
owner: string,
name: string
)
| 1137 | |
| 1138 | /** Create a new GitHub fork of this repository (owner and name) */ |
| 1139 | public async forkRepository( |
| 1140 | owner: string, |
| 1141 | name: string |
| 1142 | ): Promise<IAPIFullRepository> { |
| 1143 | try { |
| 1144 | const apiPath = `/repos/${owner}/${name}/forks` |
| 1145 | const response = await this.ghRequest('POST', apiPath) |
| 1146 | return await parsedResponse<IAPIFullRepository>(response) |
| 1147 | } catch (e) { |
| 1148 | log.error( |
| 1149 | `forkRepository: failed to fork ${owner}/${name} at endpoint: ${this.endpoint}`, |
| 1150 | e |
| 1151 | ) |
| 1152 | throw e |
| 1153 | } |
| 1154 | } |
| 1155 | |
| 1156 | /** |
| 1157 | * Fetch the issues with the given state that have been created or updated |
no test coverage detected