Update the tests for applying multiple branch based labels

This commit is contained in:
Josh Dales
2021-10-28 22:33:25 -04:00
parent 89f6b77325
commit 7aadc17f94
2 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
test-branch: test-branch:
- branch: "test/*" - branch: "test/**"
feature-branch: feature-branch:
- branch: "*/feature/*" - branch: "*/feature/*"
@@ -8,4 +8,4 @@ bug-branch:
- branch: "{bug,fix}/*" - branch: "{bug,fix}/*"
array-branch: array-branch:
- branch: ["array/*", "*/array/*"] - branch: ["array/*"]

View File

@@ -118,9 +118,9 @@ describe("run", () => {
}); });
}); });
it("adds labels based on branch names that match different glob patterns", async () => { it("adds multiple labels based on branch names that match different glob patterns", async () => {
github.context.payload.pull_request!.head = { github.context.payload.pull_request!.head = {
ref: "my/feature/that-i-like", ref: "test/feature/123",
}; };
usingLabelerConfigYaml("branches.yml"); usingLabelerConfigYaml("branches.yml");
await run(); await run();
@@ -130,7 +130,7 @@ describe("run", () => {
owner: "monalisa", owner: "monalisa",
repo: "helloworld", repo: "helloworld",
issue_number: 123, issue_number: 123,
labels: ["feature-branch"], labels: ["test-branch", "feature-branch"],
}); });
}); });