mirror of
https://github.com/actions/labeler.git
synced 2025-12-13 21:17:02 +00:00
Rename the getBranchName helper
This commit is contained in:
@@ -72,7 +72,7 @@ function getPrNumber(): number | undefined {
|
|||||||
return pullRequest.number;
|
return pullRequest.number;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBranchName(): string | undefined {
|
function getHeadBranchName(): string | undefined {
|
||||||
const pullRequest = github.context.payload.pull_request;
|
const pullRequest = github.context.payload.pull_request;
|
||||||
if (!pullRequest) {
|
if (!pullRequest) {
|
||||||
return undefined;
|
return undefined;
|
||||||
@@ -235,7 +235,7 @@ function matchBranchPattern(matcher: IMinimatch, branchName: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checkBranch(glob: string | string[]): boolean {
|
function checkBranch(glob: string | string[]): boolean {
|
||||||
const branchName = getBranchName();
|
const branchName = getHeadBranchName();
|
||||||
if (!branchName) {
|
if (!branchName) {
|
||||||
core.debug(` no branch name`);
|
core.debug(` no branch name`);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user