Finds a non-reserved branch name in the repository with respect to a base name.
(repo: GithubRepo, baseName: string)
| 283 | await this.git.github.repos.getBranch({owner: repo.owner, repo: repo.name, branch: name}); |
| 284 | return true; |
| 285 | } catch (e) { |
| 286 | // If the error has a `status` property set to `404`, then we know that the branch |
| 287 | // does not exist. Otherwise, it might be an API error that we want to report/re-throw. |
| 288 | if (isGithubApiError(e) && e.status === 404) { |
| 289 | return false; |
| 290 | } |
| 291 | throw e; |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | /** Finds a non-reserved branch name in the repository with respect to a base name. */ |
| 296 | private async _findAvailableBranchName(repo: GithubRepo, baseName: string): Promise<string> { |
nothing calls this directly
no outgoing calls
no test coverage detected