Destructure correctly

This commit is contained in:
Corey Johnson 2019-12-19 12:00:06 -08:00
parent dd1651af21
commit 314a82a7a8
2 changed files with 2 additions and 2 deletions

View file

@ -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() {

View file

@ -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)
}