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'); }