extractPrNumber() — react Function Reference
Architecture documentation for the extractPrNumber() function in data.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 576d1745_9d6b_aa03_fe9b_2d082c8e6369["extractPrNumber()"] 60d0c3ed_734d_56fa_7d21_b53dc8d70afe["data.js"] 576d1745_9d6b_aa03_fe9b_2d082c8e6369 -->|defined in| 60d0c3ed_734d_56fa_7d21_b53dc8d70afe style 576d1745_9d6b_aa03_fe9b_2d082c8e6369 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/tasks/generate-changelog/data.js lines 108–127
function extractPrNumber(subject, body) {
const patterns = [
/\(#(\d+)\)/,
/https:\/\/github\.com\/facebook\/react\/pull\/(\d+)/,
];
for (let i = 0; i < patterns.length; i++) {
const pattern = patterns[i];
const subjectMatch = subject && subject.match(pattern);
if (subjectMatch) {
return subjectMatch[1];
}
const bodyMatch = body && body.match(pattern);
if (bodyMatch) {
return bodyMatch[1];
}
}
return null;
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does extractPrNumber() do?
extractPrNumber() is a function in the react codebase, defined in scripts/tasks/generate-changelog/data.js.
Where is extractPrNumber() defined?
extractPrNumber() is defined in scripts/tasks/generate-changelog/data.js at line 108.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free