diff --git a/swh/indexer/metadata_dictionary/github.py b/swh/indexer/metadata_dictionary/github.py --- a/swh/indexer/metadata_dictionary/github.py +++ b/swh/indexer/metadata_dictionary/github.py @@ -5,7 +5,7 @@ import json from typing import Any, Dict, List, Tuple -from swh.indexer.codemeta import ACTIVITYSTREAMS_URI, FORGEFED_URI, SCHEMA_URI +from swh.indexer.codemeta import ACTIVITYSTREAMS_URI, CROSSWALK_TABLE, FORGEFED_URI from swh.indexer.storage.interface import Sha1 from .base import DirectoryLsEntry, JsonMapping, produce_terms @@ -17,11 +17,16 @@ class GitHubMapping(JsonMapping): name = "github" - mapping = { - "name": SCHEMA_URI + "name", - "license": SCHEMA_URI + "license", - } - string_fields = ["name"] + mapping = CROSSWALK_TABLE["GitHub"] + string_fields = [ + "archive_url", + "created_at", + "updated_at", + "description", + "full_name", + "html_url", + "issues_url", + ] @classmethod def detect_metadata_files(cls, file_entries: List[DirectoryLsEntry]) -> List[Sha1]: diff --git a/swh/indexer/tests/metadata_dictionary/test_github.py b/swh/indexer/tests/metadata_dictionary/test_github.py --- a/swh/indexer/tests/metadata_dictionary/test_github.py +++ b/swh/indexer/tests/metadata_dictionary/test_github.py @@ -118,5 +118,9 @@ "type": "https://www.w3.org/ns/activitystreams#OrderedCollection", }, "license": "https://spdx.org/licenses/GPL-3.0", - "name": "swh-indexer", + "name": "SoftwareHeritage/swh-indexer", + "description": "GitHub mirror of Metadata indexer", + "schema:codeRepository": "https://github.com/SoftwareHeritage/swh-indexer", + "schema:dateCreated": "2017-01-31T13:05:39Z", + "schema:dateModified": "2022-06-22T08:02:20Z", }