MCPcopy Create free account
hub / github.com/angular/dev-infra / _findAvailableBranchName

Function _findAvailableBranchName

ng-dev/release/publish/actions.ts:285–293  ·  view source on GitHub ↗

Finds a non-reserved branch name in the repository with respect to a base name.

(repo: GithubRepo, baseName: string)

Source from the content-addressed store, hash-verified

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> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected