From 314a82a7a847bc467f0998dea622e2442e30bcbb Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 19 Dec 2019 12:00:06 -0800 Subject: [PATCH] Destructure correctly --- .github/actions/changelog/lib/index.js | 2 +- .github/actions/changelog/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/changelog/lib/index.js b/.github/actions/changelog/lib/index.js index 56a48a667..efc907b7e 100644 --- a/.github/actions/changelog/lib/index.js +++ b/.github/actions/changelog/lib/index.js @@ -3811,7 +3811,7 @@ async function main() { github.context.payload.pull_request && github.context.payload.pull_request.title; const { changelog, sha } = await getChangelog(); - const updatedChangelog = { draft: [title, ...changelog.draft], ...changelog }; + const updatedChangelog = { ...changelog, draft: [title, ...changelog.draft] }; await commitChangelog(updatedChangelog, sha); } async function getChangelog() { diff --git a/.github/actions/changelog/src/index.ts b/.github/actions/changelog/src/index.ts index 6073d752e..70ca544cb 100644 --- a/.github/actions/changelog/src/index.ts +++ b/.github/actions/changelog/src/index.ts @@ -19,7 +19,7 @@ async function main() { github.context.payload.pull_request && github.context.payload.pull_request.title const { changelog, sha } = await getChangelog() - const updatedChangelog = { draft: [title, ...changelog.draft], ...changelog } + const updatedChangelog = { ...changelog, draft: [title, ...changelog.draft] } await commitChangelog(updatedChangelog, sha) }