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

Function setPercyTargetCommit

build-system/tasks/visual-diff/index.js:137–141  ·  view source on GitHub ↗

* Set the branching point's SHA to an env variable. * * This will let Percy determine which build to use as the baseline for this new * build. * * Only does something during CI, and for non-main branches, since main branch * builds are always built on top of the previous commit (we use the squ

()

Source from the content-addressed store, hash-verified

135 * merge method for pull requests.)
136 */
137function setPercyTargetCommit() {
138 if (isCiBuild() && !argv.main) {
139 process.env['PERCY_TARGET_COMMIT'] = gitCiMainBaseline();
140 }
141}
142
143/**
144 * Launches a Percy agent instance.

Callers 1

visualDiffFunction · 0.85

Calls 2

isCiBuildFunction · 0.85
gitCiMainBaselineFunction · 0.85

Tested by

no test coverage detected