MCPcopy
hub / github.com/ampproject/amphtml / gitCommitHash

Function gitCommitHash

build-system/common/git.js:142–147  ·  view source on GitHub ↗

* Returns the commit hash of the latest commit. * @return {string}

()

Source from the content-addressed store, hash-verified

140 * @return {string}
141 */
142function gitCommitHash() {
143 if (isPullRequestBuild()) {
144 return ciPullRequestSha();
145 }
146 return getStdout('git rev-parse --verify HEAD').trim();
147}
148
149/**
150 * Returns the email of the author of the latest commit on the local branch.

Callers 5

printChangeSummaryFunction · 0.85
storeBundleSizeFunction · 0.85
skipBundleSizeFunction · 0.85
reportBundleSizeFunction · 0.85
getLocalBundleSizeFunction · 0.85

Calls 3

isPullRequestBuildFunction · 0.85
ciPullRequestShaFunction · 0.85
getStdoutFunction · 0.85

Tested by

no test coverage detected