File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ const baselineCodeJSON: CodeJSON = {
2222 repositoryHost : "github" ,
2323 repositoryVisibility : "" ,
2424 homepageURL : "" ,
25- downloadURL : "" ,
26- disclaimerURL : "" ,
27- disclaimerText : "" ,
25+ downloadURL : "" ,
26+ disclaimerURL : "" ,
27+ disclaimerText : "" ,
2828 vcs : "git" ,
2929 laborHours : 0 ,
3030 reuseFrequency : {
@@ -38,9 +38,9 @@ const baselineCodeJSON: CodeJSON = {
3838 maintenance : "" ,
3939 contractNumber : [ ] ,
4040 SBOM : "" ,
41- relatedCode : [ ] ,
42- reusedCode : [ ] ,
43- partners : [ ] ,
41+ relatedCode : [ ] ,
42+ reusedCode : [ ] ,
43+ partners : [ ] ,
4444 date : {
4545 created : "" ,
4646 lastModified : "" ,
@@ -73,6 +73,9 @@ async function getMetaData(
7373 // preserve existing feedback mechanisms if they exist, otherwise default to GitHub Issues
7474 const feedbackMechanism = existingCodeJSON ?. feedbackMechanism || `${ partialCodeJSON . repositoryURL } /issues` ;
7575
76+ // preserve existing SBOM link if they exist, otherwise default to GitHub SBOM link
77+ const SBOM = existingCodeJSON ?. SBOM || `${ partialCodeJSON . repositoryURL } /network/dependencies` ;
78+
7679 // only use the calculated description if its not empty, otherwise keep existing
7780 const shouldUpdateDescription =
7881 partialCodeJSON . description && partialCodeJSON . description . trim ( ) !== "" ;
@@ -106,6 +109,7 @@ async function getMetaData(
106109 partialCodeJSON . date ?. metaDataLastUpdated ?? new Date ( ) . toISOString ( ) ,
107110 } ,
108111 feedbackMechanism,
112+ SBOM
109113 } ;
110114}
111115
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export interface CodeJSON {
2222 languages : string [ ] ; // calculated
2323 maintenance : string ;
2424 contractNumber : string [ ] ;
25- SBOM : string ;
25+ SBOM : string ; //calculated
2626 relatedCode ?: RelatedCode [ ] ;
2727 reusedCode ?: ReusedCode [ ] ;
2828 partners ?: Partner [ ] ;
You can’t perform that action at this time.
0 commit comments