Skip to content

Commit

Permalink
fix: missing reachability argument in analyzeGit function
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturSnyk committed May 11, 2021
1 parent 130381e commit cd747f3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ let analyzeFolderDefaults = {
baseURL: defaultBaseURL,
sessionToken: '',
includeLint: false,
reachability: false,
severity: AnalysisSeverity.info,
symlinksEnabled: false,
maxPayload: MAX_PAYLOAD,
Expand All @@ -254,6 +255,7 @@ export async function analyzeFolders(options: FolderOptions): Promise<IFileBundl
baseURL,
sessionToken,
includeLint,
reachability,
severity,
paths,
symlinksEnabled,
Expand Down Expand Up @@ -322,6 +324,7 @@ export async function analyzeFolders(options: FolderOptions): Promise<IFileBundl
baseURL,
sessionToken,
includeLint,
reachability,
severity,
bundleId: remoteBundle.bundleId,
source,
Expand All @@ -333,6 +336,7 @@ export async function analyzeFolders(options: FolderOptions): Promise<IFileBundl
baseURL,
sessionToken,
includeLint,
reachability,
severity,
supportedFiles,
baseDir,
Expand Down Expand Up @@ -409,14 +413,26 @@ const analyzeGitDefaults = {
baseURL: defaultBaseURL,
sessionToken: '',
includeLint: false,
reachability: false,
severity: AnalysisSeverity.info,
sarif: false,
source: '',
};

export async function analyzeGit(options: GitOptions, requestOptions?: RequestOptions): Promise<IGitBundle> {
const analysisOptions: AnalyzeGitOptions = { ...analyzeGitDefaults, ...options };
const { baseURL, sessionToken, oAuthToken, username, includeLint, severity, gitUri, sarif, source } = analysisOptions;
const {
baseURL,
sessionToken,
oAuthToken,
username,
includeLint,
reachability,
severity,
gitUri,
sarif,
source,
} = analysisOptions;
const bundleResponse = await createGitBundle(
{
baseURL,
Expand All @@ -439,6 +455,7 @@ export async function analyzeGit(options: GitOptions, requestOptions?: RequestOp
oAuthToken,
username,
includeLint,
reachability,
severity,
bundleId,
source,
Expand All @@ -451,6 +468,7 @@ export async function analyzeGit(options: GitOptions, requestOptions?: RequestOp
sessionToken,
oAuthToken,
includeLint,
reachability,
severity,
gitUri,
...analysisData,
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/analysis-options.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export interface AnalysisOptions {
baseURL: string;
sessionToken: string;
includeLint: boolean;
reachability: boolean;
severity: AnalysisSeverity;
sarif: boolean;
source: string;
Expand Down

0 comments on commit cd747f3

Please sign in to comment.