From cf82a624abfc3e503d5e59907f664561621e6fb4 Mon Sep 17 00:00:00 2001 From: Dinesh Ravi Date: Fri, 25 Oct 2024 15:38:58 +0200 Subject: [PATCH] include_license_info in Reporting.py --- blackduck/Reporting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blackduck/Reporting.py b/blackduck/Reporting.py index 70428191..7735a604 100644 --- a/blackduck/Reporting.py +++ b/blackduck/Reporting.py @@ -25,7 +25,7 @@ def create_version_reports(self, version, report_list, format="CSV"): return self.execute_post(version_reports_url, post_data) valid_notices_formats = ["TEXT", "JSON"] -def create_version_notices_report(self, version, format="TEXT", include_copyright_info=True): +def create_version_notices_report(self, version, format="TEXT", include_copyright_info=True, include_license_info=True): assert format in valid_notices_formats, "Format must be one of {}".format(valid_notices_formats) post_data = { @@ -35,6 +35,8 @@ def create_version_notices_report(self, version, format="TEXT", include_copyrigh } if include_copyright_info: post_data.update({'categories': ["COPYRIGHT_TEXT"] }) + if include_license_info: + post_data.update({'categories': ["COPYRIGHT_TEXT","LICENSE_DATA","LICENSE_TEXT"] }) notices_report_url = self.get_link(version, 'licenseReports') return self.execute_post(notices_report_url, post_data)