Changeset View
Changeset View
Standalone View
Standalone View
swh/web/save_origin_webhooks/generic_receiver.py
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | ) -> Dict[str, Any]: | ||||
f"Visit type could not be determined for repository {repo_url}." | f"Visit type could not be determined for repository {repo_url}." | ||||
) | ) | ||||
if private: | if private: | ||||
raise BadInputExc( | raise BadInputExc( | ||||
f"Repository {repo_url} is private and cannot be cloned without authentication." | f"Repository {repo_url} is private and cannot be cloned without authentication." | ||||
) | ) | ||||
save_request = create_save_origin_request( | save_request = create_save_origin_request( | ||||
visit_type=visit_type, origin_url=repo_url | visit_type=visit_type, | ||||
origin_url=repo_url, | |||||
from_webhook=True, | |||||
webhook_origin=self.FORGE_TYPE.lower(), | |||||
) | ) | ||||
return { | return { | ||||
"origin_url": save_request["origin_url"], | "origin_url": save_request["origin_url"], | ||||
"visit_type": save_request["visit_type"], | "visit_type": save_request["visit_type"], | ||||
"save_request_date": save_request["save_request_date"], | "save_request_date": save_request["save_request_date"], | ||||
"save_request_status": save_request["save_request_status"], | "save_request_status": save_request["save_request_status"], | ||||
} | } |