From 50b4be2b5ce5350adb360d0ab15da3324e9976f5 Mon Sep 17 00:00:00 2001 From: Sam Lanning Date: Sun, 25 Aug 2024 18:16:01 +0100 Subject: [PATCH] Update @s0/ghcommit --- .changeset/ninety-poems-explode.md | 5 +++++ package.json | 2 +- src/run.ts | 9 ++------- yarn.lock | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 .changeset/ninety-poems-explode.md diff --git a/.changeset/ninety-poems-explode.md b/.changeset/ninety-poems-explode.md new file mode 100644 index 00000000..b5d592ff --- /dev/null +++ b/.changeset/ninety-poems-explode.md @@ -0,0 +1,5 @@ +--- +"@changesets/action": patch +--- + +Update to latest version of ghcommit diff --git a/package.json b/package.json index 8b829387..79716a3a 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@changesets/read": "^0.5.3", "@manypkg/get-packages": "^1.1.3", "@octokit/plugin-throttling": "^5.2.1", - "@s0/ghcommit": "^1.1.0", + "@s0/ghcommit": "^1.2.0", "fs-extra": "^8.1.0", "mdast-util-to-string": "^1.0.6", "remark-parse": "^7.0.1", diff --git a/src/run.ts b/src/run.ts index 66afe6b3..25b35c93 100644 --- a/src/run.ts +++ b/src/run.ts @@ -391,14 +391,9 @@ export async function runVersion({ await commitChangesFromRepo({ octokit, - owner: github.context.repo.owner, - repository: github.context.repo.repo, + ...github.context.repo, branch: versionBranch, - // TODO: switch this to use direct string input when supported - message: { - headline: finalCommitMessage.split("\n", 2)[0].trim(), - body: finalCommitMessage.split("\n", 2)[1]?.trim(), - }, + message: finalCommitMessage, base: { commit: github.context.sha, }, diff --git a/yarn.lock b/yarn.lock index b84975a8..33800a11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1618,10 +1618,10 @@ dependencies: "@octokit/openapi-types" "^17.2.0" -"@s0/ghcommit@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@s0/ghcommit/-/ghcommit-1.1.0.tgz#789858feb3a9e9a799a6ce7abada988cd925c21f" - integrity sha512-1jEUzrfa9QvEdCaFicv2oc5ep9zFG4HE60vU48dIp+W1JzeOmPHOxNt9y5rE5TvXzTGAdLpoCvPnRrR6jCwFyw== +"@s0/ghcommit@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@s0/ghcommit/-/ghcommit-1.2.0.tgz#27b7e474653f98fb8126e249db929180b025082c" + integrity sha512-v3HlIX/OYWG32mT97JLPJQ2iCFI7hWtC2OONFoEAeiySAnbLhiToC1xlbT7fdlUcXTT2FktEJosfNbEbS9LniQ== dependencies: isomorphic-git "^1.27.1"