Skip to content

Commit

Permalink
tests now passing locally
Browse files Browse the repository at this point in the history
  • Loading branch information
tanishq-dubey committed Nov 12, 2024
1 parent d942050 commit a6e4922
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion src/commands/sbom/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const generatePayload = (
branch: tags[GIT_BRANCH] ?? "",
},
repository: {
url: tags[GIT_REPOSITORY_URL],
url: tags[GIT_REPOSITORY_URL] ?? "",
},
tags,
dependencies,
Expand Down
15 changes: 0 additions & 15 deletions src/commands/sbom/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import chalk from 'chalk'

import {getBaseUrl} from '../junit/utils'

import {REQUIRED_GIT_TAGS} from './constants'
import { SpanTag, SpanTags } from '../../helpers/interfaces';

const ICONS = {
FAILED: '❌',
SUCCESS: '✅',
Expand All @@ -22,18 +19,6 @@ export const renderInvalidFile = (sbomReport: string) => {
return fullStr
}

export const renderMissingGitAttributes = (sbomReport: string, tags: SpanTags) => {
const missingTags = REQUIRED_GIT_TAGS.filter((tag: string) => !tags[tag]);
const reportPath = `[${chalk.bold.dim(sbomReport)}]`
let fullStr = ''
fullStr += chalk.red(`There are missing git tags for ${reportPath}:\n`)
missingTags.forEach((element: SpanTag) => {
fullStr += chalk.red(` - ${element}\n`)
});
fullStr += chalk.red(`To fix this, ensure that the git information above is in your commit`)
return fullStr
}

export const renderInvalidPayload = (sbomReport: string) => {
const reportPath = `[${chalk.bold.dim(sbomReport)}]`
let fullStr = ''
Expand Down

0 comments on commit a6e4922

Please sign in to comment.