From 1df5be3c43d796ede351aa10265345a3c96a6c0c Mon Sep 17 00:00:00 2001 From: yui-Kitamura <104343758+yui-Kitamura@users.noreply.github.com> Date: Mon, 20 Mar 2023 13:55:44 +0900 Subject: [PATCH 1/9] try Infinity limit --- lib/commit.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/commit.ts b/lib/commit.ts index 9dac567..56619a6 100644 --- a/lib/commit.ts +++ b/lib/commit.ts @@ -21,10 +21,14 @@ export class Commit extends Resource { // Via: POST https://api.github.com/repos/$GITHUB_REPOSITORY/git/commits const response = await this.github.post( `/repos/${this.repo.nameWithOwner}/git/commits`, - { + { //data-body message: this.message, tree: this.tree.sha, parents: this.parents, + }, + { //config + maxBodyLength: Infinity, + maxContentLength: Infinity } ); From 0cf255c8022d3bd78ea647bd431c97ff64545481 Mon Sep 17 00:00:00 2001 From: yui-Kitamura <104343758+yui-Kitamura@users.noreply.github.com> Date: Mon, 20 Mar 2023 15:49:14 +0900 Subject: [PATCH 2/9] update action.yml --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 78105f1..fc07f6d 100644 --- a/action.yml +++ b/action.yml @@ -23,7 +23,7 @@ outputs: commit-sha: description: SHA of created commit runs: - using: node12 + using: node16 main: dist/index.js branding: icon: git-commit From 9c9a9621edefbcfe3d3f2d2e7ef8b472470837f9 Mon Sep 17 00:00:00 2001 From: yui-Kitamura <104343758+yui-Kitamura@users.noreply.github.com> Date: Mon, 20 Mar 2023 15:50:19 +0900 Subject: [PATCH 3/9] update name to be unique --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index fc07f6d..5ef2971 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: Verified commit +name: Verified commit modBy Yui-KITAMURA description: GitHub Action to create verified commits inputs: files: From d5112e0415328d7806558d33c844aed1f5e338c5 Mon Sep 17 00:00:00 2001 From: yui-Kitamura <104343758+yui-Kitamura@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:09:39 +0900 Subject: [PATCH 4/9] set limit to 2GB --- lib/commit.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/commit.ts b/lib/commit.ts index 56619a6..b1e83fb 100644 --- a/lib/commit.ts +++ b/lib/commit.ts @@ -27,8 +27,8 @@ export class Commit extends Resource { parents: this.parents, }, { //config - maxBodyLength: Infinity, - maxContentLength: Infinity + maxBodyLength: 2000000000, + maxContentLength: 2000000000 } ); From 613bc63ac8707354c0f77c788fb793c752b76c04 Mon Sep 17 00:00:00 2001 From: yui-Kitamura Date: Mon, 20 Mar 2023 16:25:24 +0900 Subject: [PATCH 5/9] set config at creation --- lib/commit.ts | 6 +----- lib/github-client.ts | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/commit.ts b/lib/commit.ts index b1e83fb..9dac567 100644 --- a/lib/commit.ts +++ b/lib/commit.ts @@ -21,14 +21,10 @@ export class Commit extends Resource { // Via: POST https://api.github.com/repos/$GITHUB_REPOSITORY/git/commits const response = await this.github.post( `/repos/${this.repo.nameWithOwner}/git/commits`, - { //data-body + { message: this.message, tree: this.tree.sha, parents: this.parents, - }, - { //config - maxBodyLength: 2000000000, - maxContentLength: 2000000000 } ); diff --git a/lib/github-client.ts b/lib/github-client.ts index 89b4458..97291c9 100644 --- a/lib/github-client.ts +++ b/lib/github-client.ts @@ -10,6 +10,8 @@ const github = axios.create({ authorization: `bearer ${process.env.GH_TOKEN}`, "user-agent": `${pkg.name}/${pkg.version}`, }, + maxBodyLength: 2000000000, //2GB + maxContentLength: 2000000000 }); export default github; From af48081c9d3deac3b81114528c3d6f9d319841c0 Mon Sep 17 00:00:00 2001 From: yui-Kitamura Date: Mon, 20 Mar 2023 16:52:31 +0900 Subject: [PATCH 6/9] 100MB may GitHub FileSize limit https://docs.github.com/ja/repositories/working-with-files/managing-large-files/about-large-files-on-github#file-size-limits --- lib/commit.ts | 2 +- lib/github-client.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/commit.ts b/lib/commit.ts index 9dac567..59097a3 100644 --- a/lib/commit.ts +++ b/lib/commit.ts @@ -25,7 +25,7 @@ export class Commit extends Resource { message: this.message, tree: this.tree.sha, parents: this.parents, - } + }, ); this.sha = response.data.sha; diff --git a/lib/github-client.ts b/lib/github-client.ts index 97291c9..ca1a6df 100644 --- a/lib/github-client.ts +++ b/lib/github-client.ts @@ -10,8 +10,8 @@ const github = axios.create({ authorization: `bearer ${process.env.GH_TOKEN}`, "user-agent": `${pkg.name}/${pkg.version}`, }, - maxBodyLength: 2000000000, //2GB - maxContentLength: 2000000000 + maxBodyLength: 100000000, //100MB GitHub FileSizeLimit + maxContentLength: 100000000 }); export default github; From ad849907d6d8e996806e792b386918aeb8560105 Mon Sep 17 00:00:00 2001 From: yui-Kitamura Date: Mon, 20 Mar 2023 17:40:47 +0900 Subject: [PATCH 7/9] ts formatting --- lib/github-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github-client.ts b/lib/github-client.ts index ca1a6df..2f96e05 100644 --- a/lib/github-client.ts +++ b/lib/github-client.ts @@ -11,7 +11,7 @@ const github = axios.create({ "user-agent": `${pkg.name}/${pkg.version}`, }, maxBodyLength: 100000000, //100MB GitHub FileSizeLimit - maxContentLength: 100000000 + maxContentLength: 100000000, }); export default github; From f10c8a05abf97bb5d7e0561e49fd5d847ea1be2c Mon Sep 17 00:00:00 2001 From: yui-Kitamura Date: Mon, 20 Mar 2023 18:13:49 +0900 Subject: [PATCH 8/9] tree blob size debugging --- lib/tree.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/tree.ts b/lib/tree.ts index b3b1046..24d284e 100644 --- a/lib/tree.ts +++ b/lib/tree.ts @@ -18,6 +18,7 @@ export class Tree extends Resource { // Save all the blobs for await (const blob of this.blobs) { await blob.save(); + this.debug(String(blob.stream.readableLength)); } // Save the tree @@ -34,7 +35,11 @@ export class Tree extends Resource { }; }), base_tree: this.parentOid, - } + }, + { + maxBodyLength: 100000000, //100MB GitHub FileSizeLimit + maxContentLength: 100000000, + } ); this.sha = response.data.sha; From a1d23ba9b107b12449a443a3f7ac7afa7a127acd Mon Sep 17 00:00:00 2001 From: yui-Kitamura Date: Mon, 17 Apr 2023 19:30:20 +0900 Subject: [PATCH 9/9] af48081c --- dist/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 6f60dda..f105d8b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3660,7 +3660,7 @@ function wrap(protocols) { // Default settings var exports = { maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, + maxBodyLength: 100 * 1024 * 1024, }; // Wrap each protocol