From f48a58b37326618ecf0b7ca25c1130506b89953e Mon Sep 17 00:00:00 2001 From: Rob van der Leek <5324924+robvanderleek@users.noreply.github.com> Date: Sun, 1 Dec 2024 14:58:41 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=9A=A7=20Try=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.js | 10 +++++++++- src/action.ts | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 38675fb..b44e739 100644 --- a/dist/index.js +++ b/dist/index.js @@ -46871,7 +46871,15 @@ function main() { process.exit(1); } const empty_tree_object = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"; - yield (0, github_2.createBranch)(octokit, owner, repo, "_codelimit_reports", empty_tree_object); + const res = yield octokit.git.createCommit({ + owner, + repo, + message: "Initial commit", + tree: empty_tree_object, + parents: [] + }); + const initialCommitSha = res.data.sha; + yield (0, github_2.createBranch)(octokit, owner, repo, "_codelimit_reports", initialCommitSha); } else { console.log("Branch _codelimit_reports already exists"); } diff --git a/src/action.ts b/src/action.ts index 066f2a3..0e9143b 100644 --- a/src/action.ts +++ b/src/action.ts @@ -114,7 +114,15 @@ async function main() { process.exit(1); } const empty_tree_object = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; - await createBranch(octokit, owner, repo, '_codelimit_reports', empty_tree_object); + const res = await octokit.git.createCommit({ + owner: owner, + repo: repo, + message: 'Initial commit', + tree: empty_tree_object, + parents: [] + }); + const initialCommitSha = res.data.sha + await createBranch(octokit, owner, repo, '_codelimit_reports', initialCommitSha); } else { console.log('Branch _codelimit_reports already exists'); }