Skip to content

include_license_info in notice report #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion blackduck/Reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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)
Expand Down
Loading