Skip to content

Commit

Permalink
Add license_detection field when building eclipse packages #518
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yang <[email protected]>
  • Loading branch information
JonoYang committed Aug 8, 2024
1 parent c2eae94 commit f2f540a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions minecode/mappers/eclipse.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def build_packages_with_json(metadata, purl=None, uri=None):

if project_metadata.get('licenses'):
common_data['extracted_license_statement'] = [l.get('name') for l in project_metadata.get('licenses', [])]
common_data['license_detections'] = []

# FIXME: this is a download page and NOT a download URL!!!!!
for download_url in project_metadata.get('download_url', []):
Expand Down Expand Up @@ -121,6 +122,7 @@ def build_packages(html_text, purl=None, uri=None):
extracted_license_statement.append(license_name)
if extracted_license_statement:
common_data['extracted_license_statement'] = extracted_license_statement
common_data['license_detections'] = []

for a in page.find_all(name='a'):
if a.contents:
Expand Down

0 comments on commit f2f540a

Please sign in to comment.