Skip to content

Commit

Permalink
Update package type for cpan and php #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 6, 2024
1 parent bdb8ca1 commit 7bed64d
Show file tree
Hide file tree
Showing 7 changed files with 278 additions and 94 deletions.
2 changes: 1 addition & 1 deletion minecode/mappers/cpan.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def build_packages_from_metafile(metadata, uri=None, purl=None):
# https://spdx.org/spdx-specification-21-web-version#h.49x2ik5
vcs_repo = vcs_tool + '+' + vcs_repo
common_data = dict(
datasource_id="cpan_metadata_json",
datasource_id="cpan_meta_json",
type='cpan',
name=name,
description=content.get('abstract', name),
Expand Down
2 changes: 1 addition & 1 deletion minecode/mappers/packagist.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def build_packages_with_json(metadata, purl=None, uri=None):
primary_language = package.get('language')
for version_content in package.get('versions').values():
common = dict(
datasource_id='composer_json',
datasource_id='php_composer_json',
type='composer',
name=version_content.get('name'),
description=version_content.get('description'),
Expand Down
4 changes: 3 additions & 1 deletion minecode/tests/testfiles/cpan/expected_json_cpanmapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@
"notice_text":null,
"source_packages":[],
"file_references":[],
"is_private":false,
"is_virtual":false,
"extra_data":{},
"dependencies":[],
"repository_homepage_url":null,
"repository_download_url":null,
"api_data_url":null,
"datasource_id":"cpan_metadata_json",
"datasource_id":"cpan_meta_json",
"purl":"pkg:cpan/Regexp-Common@2016010701"
}
]
Loading

0 comments on commit 7bed64d

Please sign in to comment.