@@ -695,8 +695,12 @@ def add_repository(self, branch_name: str | None, git_obj: Git) -> Repository |
695
695
)
696
696
697
697
self .rich_handler .add_description_table_content ("Branch:" , res_branch if res_branch else "None" )
698
- self .rich_handler .add_description_table_content ("Commit Hash:" , commit_sha )
699
- self .rich_handler .add_description_table_content ("Commit Date:" , commit_date_str )
698
+ self .rich_handler .add_description_table_content (
699
+ "Commit Hash:" , commit_sha if commit_sha else "[red]Not Found[/]"
700
+ )
701
+ self .rich_handler .add_description_table_content (
702
+ "Commit Date:" , commit_date_str if commit_date_str else "[red]Not Found[/]"
703
+ )
700
704
701
705
return repository
702
706
@@ -785,6 +789,9 @@ def add_component(
785
789
# software component. If this happens, we don't raise error and treat the software component as if it
786
790
# does not have any ``Repository`` attached to it.
787
791
repository = None
792
+ self .rich_handler .add_description_table_content ("Branch:" , "[red]Not Found[/]" )
793
+ self .rich_handler .add_description_table_content ("Commit Hash:" , "[red]Not Found[/]" )
794
+ self .rich_handler .add_description_table_content ("Commit Date:" , "[red]Not Found[/]" )
788
795
789
796
if not analysis_target .parsed_purl :
790
797
# If the PURL is not available. This will only mean that the user don't provide PURL but only provide the
@@ -1049,6 +1056,10 @@ def _determine_build_tools(self, analyze_ctx: AnalyzeContext, git_service: BaseG
1049
1056
)
1050
1057
else :
1051
1058
logger .info ("Unable to discover build tools because repository is None." )
1059
+ self .rich_handler .add_description_table_content (
1060
+ "Build Tools:" ,
1061
+ "[red]Not Found[/]" ,
1062
+ )
1052
1063
else :
1053
1064
self .rich_handler .add_description_table_content (
1054
1065
"Build Tools:" ,
@@ -1058,6 +1069,10 @@ def _determine_build_tools(self, analyze_ctx: AnalyzeContext, git_service: BaseG
1058
1069
def _determine_ci_services (self , analyze_ctx : AnalyzeContext , git_service : BaseGitService ) -> None :
1059
1070
"""Determine the CI services used by the software component."""
1060
1071
if isinstance (git_service , NoneGitService ):
1072
+ self .rich_handler .add_description_table_content (
1073
+ "CI Services:" ,
1074
+ "[red]Not Found[/]" ,
1075
+ )
1061
1076
return
1062
1077
1063
1078
# Determine the CI services.
@@ -1095,6 +1110,11 @@ def _determine_ci_services(self, analyze_ctx: AnalyzeContext, git_service: BaseG
1095
1110
"CI Services:" ,
1096
1111
"\n " .join ([ci_service ["service" ].name for ci_service in analyze_ctx .dynamic_data ["ci_services" ]]),
1097
1112
)
1113
+ else :
1114
+ self .rich_handler .add_description_table_content (
1115
+ "CI Services:" ,
1116
+ "[red]Not Found[/]" ,
1117
+ )
1098
1118
1099
1119
def _populate_package_registry_info (self ) -> list [PackageRegistryInfo ]:
1100
1120
"""Add all possible package registries to the analysis context."""
0 commit comments