MCPcopy Create free account
hub / github.com/github/gh-aw / buildOversizedPatch

Function buildOversizedPatch

actions/setup/js/create_pull_request.test.cjs:3948–3960  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

3946
3947 // Build a patch string touching `n` unique files
3948 function buildOversizedPatch(n) {
3949 const lines = [];
3950 for (let i = 0; i < n; i++) {
3951 lines.push(`diff --git a/file${i}.txt b/file${i}.txt`);
3952 lines.push("index 1234567..abcdefg 100644");
3953 lines.push(`--- a/file${i}.txt`);
3954 lines.push(`+++ b/file${i}.txt`);
3955 lines.push("@@ -1,1 +1,1 @@");
3956 lines.push("-old");
3957 lines.push("+new");
3958 }
3959 return lines.join("\n");
3960 }
3961
3962 it("should create a fallback issue when E003 fires and fallback_as_issue is true (default)", async () => {
3963 const patchPath = canonicalPatchPath("data/refresh");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected