extract_pr_id_form_url

Function extract_pr_id_form_url 

Source
pub(crate) fn extract_pr_id_form_url(url: &Url) -> Result<String>
Expand description

Extracts the pull request numeric ID from a GitHub URL.

Supported forms:

  • Direct PR path: .../pull/<ID> (ID may not be last segment).
  • Actions run URL with ?pr=<ID> (also supports /job/<JOB_ID> variants).

ยงErrors

  • Host is not github.com.
  • The PR id segment or query parameter is missing, empty, duplicated, or malformed.