getCommitLog() — react Function Reference
Architecture documentation for the getCommitLog() function in prepare-release.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 9e3c854f_4333_38e1_0e1c_40b1ff22730b["getCommitLog()"] 497982e7_e1b1_28ad_fd0c_dc03591e3177["prepare-release.js"] 9e3c854f_4333_38e1_0e1c_40b1ff22730b -->|defined in| 497982e7_e1b1_28ad_fd0c_dc03591e3177 cadb4d3f_5109_b4e0_6f72_18067565caef["main()"] cadb4d3f_5109_b4e0_6f72_18067565caef -->|calls| 9e3c854f_4333_38e1_0e1c_40b1ff22730b 75446d2e_f8f9_2828_294c_8b7bff5cc39e["hasGithubCLI()"] 9e3c854f_4333_38e1_0e1c_40b1ff22730b -->|calls| 75446d2e_f8f9_2828_294c_8b7bff5cc39e style 9e3c854f_4333_38e1_0e1c_40b1ff22730b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/devtools/prepare-release.js lines 98–132
async function getCommitLog(sha) {
let shortLog = '';
let formattedLog = '';
const hasGh = await hasGithubCLI();
const rawLog = await execRead(`
git log --topo-order --pretty=format:'%s' ${sha}...HEAD -- packages/react-devtools*
`);
const lines = rawLog.split('\n');
for (let i = 0; i < lines.length; i++) {
const line = lines[i].replace(/^\[devtools\] */i, '');
const match = line.match(/(.+) \(#([0-9]+)\)/);
if (match !== null) {
const title = match[1];
const pr = match[2];
let username;
if (hasGh) {
const response = await execRead(
`gh api /repos/facebook/react/pulls/${pr}`
);
const {user} = JSON.parse(response);
username = `[${user.login}](${user.html_url})`;
} else {
username = '[USERNAME](https://github.com/USERNAME)';
}
formattedLog += `\n* ${title} (${username} in [#${pr}](${PULL_REQUEST_BASE_URL}${pr}))`;
shortLog += `\n* ${title}`;
} else {
formattedLog += `\n* ${line}`;
shortLog += `\n* ${line}`;
}
}
return [shortLog, formattedLog];
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does getCommitLog() do?
getCommitLog() is a function in the react codebase, defined in scripts/devtools/prepare-release.js.
Where is getCommitLog() defined?
getCommitLog() is defined in scripts/devtools/prepare-release.js at line 98.
What does getCommitLog() call?
getCommitLog() calls 1 function(s): hasGithubCLI.
What calls getCommitLog()?
getCommitLog() is called by 1 function(s): main.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free