Skip to content

Commit c7ae669

Browse files
committed
chore(release-tooling): Fix PR count message
1 parent d326b07 commit c7ae669

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tasks/release/release.mjs

+8-6
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ async function resolveMilestones() {
209209
{
210210
search(
211211
query: "repo:redwoodjs/redwood is:pr is:merged milestone:next-release-patch"
212-
first: 5
212+
first: 51
213213
type: ISSUE
214214
) {
215215
nodes {
@@ -222,12 +222,14 @@ async function resolveMilestones() {
222222
`)
223223

224224
if (semver === 'patch') {
225+
const prettyPatch = chalk.magenta('next-release-patch')
226+
const singularMsg = `There's 1 PR that has the ${prettyPatch} milestone.`
227+
const pluralMsg =
228+
prs.length <= 50
229+
? `There are ${prs.length} PRs that have the ${prettyPatch} milestone.`
230+
: `There are more than 50 PRs that have the ${prettyPatch} milestone.`
225231
console.log()
226-
console.log(
227-
`There's ${prs.length} PR(s) that have the ${chalk.magenta(
228-
'next-release-patch'
229-
)} milestone.`
230-
)
232+
console.log(prs.length === 1 ? singularMsg : pluralMsg)
231233

232234
if (
233235
!isYes(

0 commit comments

Comments
 (0)