corvix.hydration.providers.github_web_url ========================================= .. py:module:: corvix.hydration.providers.github_web_url .. autoapi-nested-parse:: Hydration provider for deriving browser URLs from GitHub notification subjects. Attributes ---------- .. autoapisummary:: corvix.hydration.providers.github_web_url._MIN_API_REPO_SEGMENTS corvix.hydration.providers.github_web_url._MIN_RESOURCE_SEGMENTS corvix.hydration.providers.github_web_url._RELEASE_TAG_SEGMENTS corvix.hydration.providers.github_web_url._ACTIONS_RUNS_SEGMENTS corvix.hydration.providers.github_web_url._API_RESOURCE_TO_WEB_PATH corvix.hydration.providers.github_web_url._CHECK_SUITE_TITLE_RE Classes ------- .. autoapisummary:: corvix.hydration.providers.github_web_url.GitHubWebUrlProvider corvix.hydration.providers.github_web_url._ParsedCheckSuiteTitle Functions --------- .. autoapisummary:: corvix.hydration.providers.github_web_url._parse_github_api_path corvix.hydration.providers.github_web_url._is_str_object_map corvix.hydration.providers.github_web_url._parse_check_suite_title corvix.hydration.providers.github_web_url._build_actions_branch_url corvix.hydration.providers.github_web_url._build_actions_api_base corvix.hydration.providers.github_web_url._match_check_suite_run corvix.hydration.providers.github_web_url._parse_github_timestamp corvix.hydration.providers.github_web_url.map_subject_api_url_to_web Module Contents --------------- .. py:data:: _MIN_API_REPO_SEGMENTS :value: 4 .. py:data:: _MIN_RESOURCE_SEGMENTS :value: 2 .. py:data:: _RELEASE_TAG_SEGMENTS :value: 3 .. py:data:: _ACTIONS_RUNS_SEGMENTS :value: 3 .. py:data:: _API_RESOURCE_TO_WEB_PATH .. py:data:: _CHECK_SUITE_TITLE_RE .. py:function:: _parse_github_api_path(subject_url: str) -> tuple[urllib.parse.ParseResult, list[str], int] .. py:function:: _is_str_object_map(value: object) -> TypeIs[dict[str, object]] .. py:class:: GitHubWebUrlProvider Hydrates notification.web_url with direct and API-based mappings. .. py:attribute:: timeout_seconds :type: float :value: 10.0 .. py:attribute:: name :type: str :value: 'github.web_url' .. py:method:: hydrate(notification: corvix.domain.Notification, client: corvix.pipeline.base.JsonFetchClient, ctx: corvix.hydration.base.HydrationContext) -> corvix.domain.Notification .. py:method:: _resolve_check_suite(client: corvix.pipeline.base.JsonFetchClient, ctx: corvix.hydration.base.HydrationContext, notification: corvix.domain.Notification, repo_base: str) -> str | None .. py:method:: _resolve_check_suite_from_subject_url(client: corvix.pipeline.base.JsonFetchClient, ctx: corvix.hydration.base.HydrationContext, subject_url: str, repository: str) -> str | None .. py:method:: _resolve_release(client: corvix.pipeline.base.JsonFetchClient, ctx: corvix.hydration.base.HydrationContext, subject_url: str) -> str | None .. py:class:: _ParsedCheckSuiteTitle .. py:attribute:: workflow :type: str .. py:attribute:: branch :type: str .. py:attribute:: attempt :type: int | None .. py:function:: _parse_check_suite_title(title: str) -> _ParsedCheckSuiteTitle | None .. py:function:: _build_actions_branch_url(repo_base: str, branch: str) -> str .. py:function:: _build_actions_api_base(repo_base: str) -> str .. py:function:: _match_check_suite_run(workflow_runs: list[object], workflow_name: str, run_attempt: int | None, target_timestamp: datetime.datetime) -> dict[str, object] | None .. py:function:: _parse_github_timestamp(raw: str) -> datetime.datetime | None .. py:function:: map_subject_api_url_to_web(subject_url: str, repo_name: str, repo_base: str) -> str | None Map a subject API URL to its browser URL when possible.