Skip to content

Commit 890bee0

Browse files
committed
dix: fix create tree
1 parent f9086c4 commit 890bee0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38249,7 +38249,7 @@ async function createCommit(octokit, repository, args) {
3824938249
const chunk = commitTreeBlobs.slice(i, i + chunkSize);
3825038250
chunkBaseTree = commitTreeSha = await octokit.rest.git.createTree({
3825138251
...repository,
38252-
...(chunkBaseTree !== undefined ? { base_tree: chunkBaseTree } : {}),
38252+
base_tree: chunkBaseTree,
3825338253
tree: chunk,
3825438254
}).then(({ data }) => data.sha).finally(() => {
3825538255
progress++;

lib/github.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ export async function createCommit(
5959
console.log('Creating commit tree...')
6060
const chunkSize = 100
6161

62-
let chunkBaseTree: string | undefined = args.parents[0]
62+
let chunkBaseTree = args.parents[0]
6363
for (let i = 0; i < commitTreeBlobs.length; i += chunkSize) {
6464
const chunk = commitTreeBlobs.slice(i, i + chunkSize)
6565
chunkBaseTree = commitTreeSha = await octokit.rest.git.createTree({
6666
...repository,
67-
...(chunkBaseTree !== undefined ? {base_tree: chunkBaseTree} : {}),
67+
base_tree: chunkBaseTree,
6868
tree: chunk,
6969
}).then(({data}) => data.sha).finally(() => {
7070
progress++;

0 commit comments

Comments
 (0)