MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / validatePullRequest

Function validatePullRequest

scripts/validate-pull-request-peer-bumps.ts:47–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47async function validatePullRequest() {
48 if (isReleasePR()) {
49 console.log("Ignore peer bump check for release PR.");
50 return;
51 }
52
53 if (hasNoPeerBumpNeededLabel()) {
54 console.log(`The PR is labeled as '${PEER_BUMP_LABEL}'`);
55 return;
56 }
57
58 if (await hasPeerBumpEntry()) {
59 console.log("Peer bump entry found");
60 return;
61 }
62
63 throw new Error(
64 `No peer bump entry found. Either modify ${peerBumpsFile} or add the '${PEER_BUMP_LABEL}' label to this PR.`,
65 );
66}
67
68await validatePullRequest();

Calls 3

hasNoPeerBumpNeededLabelFunction · 0.85
hasPeerBumpEntryFunction · 0.85
isReleasePRFunction · 0.70

Tested by

no test coverage detected