refactor(docs-infra): fix method name (getPrfromBranch --> getPrFromBranch) (#25671)

PR Close #25671
This commit is contained in:
George Kalpakas 2018-08-26 00:25:59 +03:00 committed by Kara Erickson
parent ce4aa5cb93
commit 153738dce9

View File

@ -34,7 +34,7 @@ export class BuildRetriever {
const buildInfo = await this.api.getBuildInfo(buildNum); const buildInfo = await this.api.getBuildInfo(buildNum);
const githubInfo: GithubInfo = { const githubInfo: GithubInfo = {
org: buildInfo.username, org: buildInfo.username,
pr: getPrfromBranch(buildInfo.branch), pr: getPrFromBranch(buildInfo.branch),
repo: buildInfo.reponame, repo: buildInfo.reponame,
sha: buildInfo.vcs_revision, sha: buildInfo.vcs_revision,
success: !buildInfo.failed, success: !buildInfo.failed,
@ -73,7 +73,7 @@ export class BuildRetriever {
} }
} }
function getPrfromBranch(branch: string): number { function getPrFromBranch(branch: string): number {
// CircleCI only exposes PR numbers via the `branch` field :-( // CircleCI only exposes PR numbers via the `branch` field :-(
const match = /^pull\/(\d+)$/.exec(branch); const match = /^pull\/(\d+)$/.exec(branch);
if (!match) { if (!match) {