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

Function hasChangeset

scripts/validate-pull-request-changeset.ts:35–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35async function hasChangeset() {
36 if (process.env.GITHUB_BASE_REF === undefined) {
37 throw new Error("GITHUB_BASE_REF is not defined");
38 }
39
40 const { stdout } = await exec(
41 `git diff --name-only --diff-filter=A ${process.env.GITHUB_BASE_REF} -- ${changesetDir}`,
42 );
43
44 const changesets = stdout
45 .trim()
46 .split("\n")
47 .filter((file) => file.endsWith(".md"));
48
49 return changesets.length > 0;
50}
51
52async function validatePullRequest() {
53 if (isReleasePR()) {

Callers 1

validatePullRequestFunction · 0.85

Calls 2

execFunction · 0.85
filterMethod · 0.80

Tested by

no test coverage detected