From 52292c881f4c62109df460f0c7dd54b4513defcd Mon Sep 17 00:00:00 2001 From: Eoghan Murray Date: Tue, 7 Nov 2023 17:43:05 +0000 Subject: [PATCH 1/3] Make the success message shorter than the failure message and tweak the visuals to better distinguish the two --- index.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/index.ts b/index.ts index ff01d8e..e8b6e0c 100644 --- a/index.ts +++ b/index.ts @@ -57,11 +57,11 @@ const getAbsentMessage = ( commitSha: string, addChangesetUrl: string, releasePlan: ReleasePlan | null -) => `### ⚠️ No Changeset found +) => `### ⚠️ No Changeset found ⚠️ Latest commit: ${commitSha} -Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.** +Merging this PR will **not** cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.** ${getReleasePlanMessage(releasePlan)} @@ -75,18 +75,11 @@ const getApproveMessage = ( commitSha: string, addChangesetUrl: string, releasePlan: ReleasePlan | null -) => `### 🦋 Changeset detected +) => `### Changeset detected! 🦋 🦋 🦋 -Latest commit: ${commitSha} - -**The changes in this PR will be included in the next version bump.** +✅ The changes in this PR will be included in the next version bump. [More Info](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) • [Add Another Changeset](${addChangesetUrl}) ${getReleasePlanMessage(releasePlan)} - -Not sure what this means? [Click here to learn what changesets are](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md). - -[Click here if you're a maintainer who wants to add another changeset to this PR](${addChangesetUrl}) - `; const getNewChangesetTemplate = (changedPackages: string[], title: string) => From 451eddf2214b6816a5e3ce194bcdc25c75378919 Mon Sep 17 00:00:00 2001 From: Eoghan Murray Date: Wed, 8 Nov 2023 15:39:06 +0000 Subject: [PATCH 2/3] Further make the 'success' version shorter. Think the tick mark is more important than the butterflies, as the butterfly is already there in the bot icon --- index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.ts b/index.ts index e8b6e0c..64b1ca8 100644 --- a/index.ts +++ b/index.ts @@ -34,14 +34,14 @@ const getReleasePlanMessage = (releasePlan: ReleasePlan | null) => { }), ]); - return `
This PR includes ${ + return `
This PR ${ releasePlan.changesets.length - ? `changesets to release ${ + ? `will increment versioning on the next release of the following ${ publishableReleases.length === 1 - ? "1 package" + ? "package" : `${publishableReleases.length} packages` }` - : "no changesets" + : "includes no changesets" } ${ @@ -75,9 +75,9 @@ const getApproveMessage = ( commitSha: string, addChangesetUrl: string, releasePlan: ReleasePlan | null -) => `### Changeset detected! 🦋 🦋 🦋 +) => `### ✅ Changeset detected! -✅ The changes in this PR will be included in the next version bump. [More Info](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) • [Add Another Changeset](${addChangesetUrl}) +[More Info](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) • [Add Another Changeset](${addChangesetUrl}) ${getReleasePlanMessage(releasePlan)} `; From 784aec4a26702a647c553b8bd929d061bb28a1b2 Mon Sep 17 00:00:00 2001 From: Eoghan Murray Date: Wed, 8 Nov 2023 15:51:05 +0000 Subject: [PATCH 3/3] On second thoughts, the 'More Info' link could be construed as referring to 'More Info on this changeset' --- index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 64b1ca8..9229c52 100644 --- a/index.ts +++ b/index.ts @@ -75,9 +75,9 @@ const getApproveMessage = ( commitSha: string, addChangesetUrl: string, releasePlan: ReleasePlan | null -) => `### ✅ Changeset detected! +) => `### ✅ Changeset detected [ⓘ](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) -[More Info](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) • [Add Another Changeset](${addChangesetUrl}) +[Add Another Changeset](${addChangesetUrl}) ${getReleasePlanMessage(releasePlan)} `;