Skip to main content

extract_issue_references

Function extract_issue_references 

Source
pub fn extract_issue_references(
    body: &str,
    custom_patterns: &[&str],
) -> Vec<IssueReference>
Expand description

Extract issue references from a change request body.

Recognized patterns:

  • Numeric issue: #123, fixes #456, closes #789, resolves #012 (GitHub, GitLab, Bitbucket, Gitea)
  • Project ticket: PROJ-123, ENG-456 (Jira, Linear, etc.)
  • Shortcut: sc-12345 (case-insensitive two-letter prefix)
  • URL: URLs containing known tracker patterns (GitHub, Jira, Linear, Notion, Shortcut)
  • Custom patterns provided by the caller