Skip to content

Commit 1725a15

Browse files
committed
fix: PR Comments
1 parent 920e96b commit 1725a15

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.github/CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ A number of environment variable are required for debugging, here's an example l
2727
"INPUT_failOnIssues": "true",
2828
"INPUT_authToken": "your-auth-token-guid-from-portal",
2929
"INPUT_targetFile": "path-to-visual-studio-solution.sln",
30-
"INPUT_organization" : "your-org-guid-from-portal",
31-
"INPUT_monitorWhen" : "never",
32-
"INPUT_severityThreshold" : "low",
33-
"INPUT_failOnThreshold" : "critical"
30+
"INPUT_organization": "your-org-guid-from-portal",
31+
"INPUT_monitorWhen": "never",
32+
"INPUT_severityThreshold": "low",
33+
"INPUT_failOnThreshold": "critical",
34+
"NODE_OPTIONS": null
3435
},
3536
"outFiles": [
3637
"${workspaceFolder}/**/*.js"
@@ -79,7 +80,7 @@ To release a major you need to add `BREAKING CHANGE: ` to the start of the body
7980

8081
Ensure that your code adheres to the included `.eslintrc` config by running `npm run test:checks`.
8182

82-
Check your code is formatted by running `prettier` e.g. `npx prettier --check snykTask/**/*.ts` and auto-fix any violations by performing `npx prettier --write snykTask/**/*.ts`
83+
Fix any `prettier` violations reported before pushing by running `npm run format`
8384

8485
## Sending pull requests
8586

snykTask/src/__tests__/task-lib.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ test('defaults to found when file does not exist', () => {
7777
expect(itemsFound).toBe(true);
7878
});
7979

80-
test('ignores vulnerabilities lower than high threshold', () => {
80+
test('does not match vulnerabilities lower than high threshold', () => {
8181
const fixturePath = 'snykTask/test/fixtures/low-vulnerabilities.json';
8282
const itemsFound = doVulnerabilitiesExistForFailureThreshold(
8383
fixturePath,

snykTask/src/task-args.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ class TaskArgs {
7676
public validate() {
7777
if (this.failOnThreshold) {
7878
if (this.isNotValidThreshold(this.failOnThreshold)) {
79-
const errorMsg = `If set, failOnThreshold must be '${Severity.CRITICAL}' or '${Severity.HIGH}' or '${Severity.MEDIUM}' or '${Severity.LOW}' (case insensitive). If not set, the default is 'low'.`;
79+
const errorMsg = `If set, failOnThreshold must be '${Severity.CRITICAL}' or '${Severity.HIGH}' or '${Severity.MEDIUM}' or '${Severity.LOW}' (case insensitive). If not set, the default is '${Severity.LOW}'.`;
8080
throw new Error(errorMsg);
8181
}
8282
}
8383

8484
if (this.severityThreshold) {
8585
if (this.isNotValidThreshold(this.severityThreshold)) {
86-
const errorMsg = `If set, severityThreshold must be '${Severity.CRITICAL}' or '${Severity.HIGH}' or '${Severity.MEDIUM}' or '${Severity.LOW}' (case insensitive). If not set, the default is 'low'.`;
86+
const errorMsg = `If set, severityThreshold must be '${Severity.CRITICAL}' or '${Severity.HIGH}' or '${Severity.MEDIUM}' or '${Severity.LOW}' (case insensitive). If not set, the default is '${Severity.LOW}'.`;
8787
throw new Error(errorMsg);
8888
}
8989
}

0 commit comments

Comments
 (0)