MCPcopy
hub / github.com/django/django / extract_ticket_id

Function extract_ticket_id

scripts/pr_quality/check_pr.py:174–177  ·  view source on GitHub ↗

Return the Trac ticket ID string from the PR body, or None.

(pr_body)

Source from the content-addressed store, hash-verified

172
173
174def extract_ticket_id(pr_body):
175 """Return the Trac ticket ID string from the PR body, or None."""
176 match = re.search(r"\bticket-(\d+)\b", pr_body, re.IGNORECASE)
177 return match.group(1) if match else None
178
179
180def fetch_trac_ticket(ticket_id):

Callers 1

mainFunction · 0.85

Calls 1

searchMethod · 0.80

Tested by

no test coverage detected