Remove checks for triggering on specific paths
These are no longer necessary with the new approach to selecting alerts to show on pull requests.
This commit is contained in:
parent
fff3a80b5b
commit
f6e4cff38a
6 changed files with 8 additions and 58 deletions
15
lib/workflow.test.js
generated
15
lib/workflow.test.js
generated
|
|
@ -58,15 +58,6 @@ function errorCodes(actual, expected) {
|
|||
});
|
||||
t.deepEqual(...errorCodes(errors, []));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push should not have a path", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
||||
on: {
|
||||
push: { branches: ["main"], paths: ["test/*"] },
|
||||
pull_request: { branches: ["main"] },
|
||||
},
|
||||
});
|
||||
t.deepEqual(...errorCodes(errors, [workflow_1.WorkflowErrors.PathsSpecified]));
|
||||
});
|
||||
(0, ava_1.default)("getWorkflowErrors() when on.push is a correct object", (t) => {
|
||||
const errors = (0, workflow_1.getWorkflowErrors)({
|
||||
on: { push: { branches: ["main"] }, pull_request: { branches: ["main"] } },
|
||||
|
|
@ -227,7 +218,7 @@ function errorCodes(actual, expected) {
|
|||
(0, ava_1.default)("formatWorkflowErrors() when there are multiple errors", (t) => {
|
||||
const message = (0, workflow_1.formatWorkflowErrors)([
|
||||
workflow_1.WorkflowErrors.CheckoutWrongHead,
|
||||
workflow_1.WorkflowErrors.PathsSpecified,
|
||||
workflow_1.WorkflowErrors.MismatchedBranches,
|
||||
]);
|
||||
t.true(message.startsWith("2 issues were detected with this workflow:"));
|
||||
});
|
||||
|
|
@ -238,9 +229,9 @@ function errorCodes(actual, expected) {
|
|||
(0, ava_1.default)("formatWorkflowCause()", (t) => {
|
||||
const message = (0, workflow_1.formatWorkflowCause)([
|
||||
workflow_1.WorkflowErrors.CheckoutWrongHead,
|
||||
workflow_1.WorkflowErrors.PathsSpecified,
|
||||
workflow_1.WorkflowErrors.MismatchedBranches,
|
||||
]);
|
||||
t.deepEqual(message, "CheckoutWrongHead,PathsSpecified");
|
||||
t.deepEqual(message, "CheckoutWrongHead,MismatchedBranches");
|
||||
t.deepEqual((0, workflow_1.formatWorkflowCause)([]), undefined);
|
||||
});
|
||||
(0, ava_1.default)("patternIsSuperset()", (t) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue