Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/metadata_dictionary/github.py
Show All 16 Lines | |||||
class GitHubMapping(BaseExtrinsicMapping, JsonMapping): | class GitHubMapping(BaseExtrinsicMapping, JsonMapping): | ||||
name = "github" | name = "github" | ||||
mapping = { | mapping = { | ||||
**CROSSWALK_TABLE["GitHub"], | **CROSSWALK_TABLE["GitHub"], | ||||
"topics": SCHEMA.keywords, # TODO: submit this to the official crosswalk | "topics": SCHEMA.keywords, # TODO: submit this to the official crosswalk | ||||
} | } | ||||
string_fields = [ | uri_fields = [ | ||||
"archive_url", | "archive_url", | ||||
"html_url", | |||||
"issues_url", | |||||
] | |||||
date_fields = [ | |||||
"created_at", | "created_at", | ||||
"updated_at", | "updated_at", | ||||
] | |||||
string_fields = [ | |||||
"description", | "description", | ||||
"full_name", | "full_name", | ||||
"html_url", | |||||
"issues_url", | |||||
"topics", | "topics", | ||||
] | ] | ||||
@classmethod | @classmethod | ||||
def extrinsic_metadata_formats(cls) -> Tuple[str, ...]: | def extrinsic_metadata_formats(cls) -> Tuple[str, ...]: | ||||
return ("application/vnd.github.v3+json",) | return ("application/vnd.github.v3+json",) | ||||
def extra_translation(self, graph, root, content_dict): | def extra_translation(self, graph, root, content_dict): | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |