pub fn parse_github_reference(
kind: ReferenceKind,
input: &str,
repo_context: Option<&str>,
) -> Result<(String, String, u64)>Expand description
Parses a GitHub reference (issue or PR) in multiple formats.
Supports:
- Full URL:
https://github.com/owner/repo/issues/123orhttps://github.com/owner/repo/pull/123 - Short form:
owner/repo#123 - Bare number:
123(requiresrepo_context)
§Arguments
kind- The type of reference (Issue or Pull)input- The reference to parserepo_context- Optional repository context for bare numbers (e.g., “owner/repo”)
§Errors
Returns an error if the format is invalid or bare number is used without context.