refactor(docs-infra): fix method name (getPrfromBranch --> getPrFromBranch) (#25671)
PR Close #25671
This commit is contained in:
parent
e2bc0ad6c2
commit
182c08bee1
|
@ -34,7 +34,7 @@ export class BuildRetriever {
|
|||
const buildInfo = await this.api.getBuildInfo(buildNum);
|
||||
const githubInfo: GithubInfo = {
|
||||
org: buildInfo.username,
|
||||
pr: getPrfromBranch(buildInfo.branch),
|
||||
pr: getPrFromBranch(buildInfo.branch),
|
||||
repo: buildInfo.reponame,
|
||||
sha: buildInfo.vcs_revision,
|
||||
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 :-(
|
||||
const match = /^pull\/(\d+)$/.exec(branch);
|
||||
if (!match) {
|
||||
|
|
Loading…
Reference in New Issue