mirror of
https://github.com/actions/labeler.git
synced 2025-12-12 12:37:48 +00:00
Update the tests for applying multiple branch based labels
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
test-branch:
|
||||
- branch: "test/*"
|
||||
- branch: "test/**"
|
||||
|
||||
feature-branch:
|
||||
- branch: "*/feature/*"
|
||||
@@ -8,4 +8,4 @@ bug-branch:
|
||||
- branch: "{bug,fix}/*"
|
||||
|
||||
array-branch:
|
||||
- branch: ["array/*", "*/array/*"]
|
||||
- branch: ["array/*"]
|
||||
|
||||
@@ -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 = {
|
||||
ref: "my/feature/that-i-like",
|
||||
ref: "test/feature/123",
|
||||
};
|
||||
usingLabelerConfigYaml("branches.yml");
|
||||
await run();
|
||||
@@ -130,7 +130,7 @@ describe("run", () => {
|
||||
owner: "monalisa",
|
||||
repo: "helloworld",
|
||||
issue_number: 123,
|
||||
labels: ["feature-branch"],
|
||||
labels: ["test-branch", "feature-branch"],
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user