Skip to content

Commit

Permalink
feat: support sev.threshold for unm.-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dekelund committed Nov 18, 2022
1 parent e01c853 commit 5054c8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/lib/ecosystems/resolve-test-facts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ async function fetchIssues(
start_time,
dep_graph_data,
component_details,
target_severity,
orgId: string,
) {
const response: GetIssuesResponse = await getIssues(
{
dep_graph: dep_graph_data,
start_time,
component_details,
target_severity,
},
orgId,
);
Expand Down Expand Up @@ -148,6 +150,7 @@ export async function resolveAndTestFactsUnmanagedDeps(
const displayTargetFile = '';

let orgId = options.org || '';
let target_severity = options.severityThreshold || 'low';

if (orgId === '') {
const self = await getSelf();
Expand All @@ -164,11 +167,8 @@ export async function resolveAndTestFactsUnmanagedDeps(
orgId,
);

const {
start_time,
dep_graph_data,
component_details,
} = await pollDepGraphAttributes(id, orgId);
const { start_time, dep_graph_data, component_details } =
await pollDepGraphAttributes(id, orgId);

const {
issues,
Expand All @@ -181,6 +181,7 @@ export async function resolveAndTestFactsUnmanagedDeps(
start_time,
dep_graph_data,
component_details,
target_severity,
orgId,
);

Expand Down
1 change: 1 addition & 0 deletions src/lib/ecosystems/unmanaged/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export interface IssuesRequestAttributes {
start_time: number;
dep_graph: IssuesRequestDepGraphDataOpenAPI;
component_details: IssuesRequestComponentDetails;
target_severity: SEVERITY;
}

export interface Data {
Expand Down

0 comments on commit 5054c8d

Please sign in to comment.