From e56b59136ef14607be5db2aa87c1966a7642ed33 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 22 Jul 2024 14:43:31 -0400 Subject: [PATCH 1/2] repo-gardening: Remove guessing of release dates We added this guessing back when Jetpack was the only plugin, and we still did a week-long testing week. That just got carried forward as we added additional plugins and so on. For Jetpack we should be safe relying on the milestone, it's on the release checklist to create the new milestone. For most of the other plugins, if there's no milestone then we may as well just say there's no scheduled release. The exceptions to that are wpcomsh and mu-wpcom-plugin, which get custom messaging if no milestone exists. --- ...remove-gardening-guessing-of-release-dates | 4 ++++ .../src/tasks/check-description/index.js | 21 ++++++------------- 2 files changed, 10 insertions(+), 15 deletions(-) create mode 100644 projects/github-actions/repo-gardening/changelog/remove-gardening-guessing-of-release-dates diff --git a/projects/github-actions/repo-gardening/changelog/remove-gardening-guessing-of-release-dates b/projects/github-actions/repo-gardening/changelog/remove-gardening-guessing-of-release-dates new file mode 100644 index 0000000000000..d0c1d5b7f15ec --- /dev/null +++ b/projects/github-actions/repo-gardening/changelog/remove-gardening-guessing-of-release-dates @@ -0,0 +1,4 @@ +Significance: patch +Type: removed + +Check description task: Remove general guessing of release dates and code freezes. Add special casing for wpcomsh and mu-wpcom-plugin. diff --git a/projects/github-actions/repo-gardening/src/tasks/check-description/index.js b/projects/github-actions/repo-gardening/src/tasks/check-description/index.js index 00da8cb840dda..9152243ceadde 100644 --- a/projects/github-actions/repo-gardening/src/tasks/check-description/index.js +++ b/projects/github-actions/repo-gardening/src/tasks/check-description/index.js @@ -65,7 +65,7 @@ async function hasProgressLabel( octokit, owner, repo, number ) { * @returns {Promise} Promise resolving to info about the release (code freeze, release date). */ async function getMilestoneDates( plugin, nextMilestone ) { - let releaseDate; + let releaseDate = 'none scheduled'; let codeFreezeDate; if ( nextMilestone && nextMilestone.hasOwnProperty( 'due_on' ) && nextMilestone.due_on ) { releaseDate = moment( nextMilestone.due_on ).format( 'LL' ); @@ -77,19 +77,11 @@ async function getMilestoneDates( plugin, nextMilestone ) { // If we have a date and it is valid, use it, otherwise set code freeze to a week before the release. if ( freezeDateDescription && moment( freezeDateDescription[ 1 ] ).isValid() ) { codeFreezeDate = moment( freezeDateDescription[ 1 ] ).format( 'LL' ); - } else { - codeFreezeDate = moment( nextMilestone.due_on ).subtract( 7, 'd' ).format( 'LL' ); } - } else { - // Fallback to raw math calculation - // Calculate next release date - const firstTuesdayOfMonth = moment().add( 1, 'months' ).startOf( 'month' ); - while ( firstTuesdayOfMonth.day() !== 2 ) { - firstTuesdayOfMonth.add( 1, 'day' ); - } - releaseDate = firstTuesdayOfMonth.format( 'LL' ); - // Calculate next code freeze date - codeFreezeDate = firstTuesdayOfMonth.subtract( 8, 'd' ).format( 'LL' ); + } else if ( plugin === 'wpcomsh' ) { + releaseDate = 'on demand (usually Mondays if not sooner)'; + } else if ( plugin === 'mu-wpcom-plugin' ) { + releaseDate = 'WordPress.com Simple releases happen daily'; } const capitalizedName = plugin @@ -113,8 +105,7 @@ ${ - Releases to self-hosted sites happen monthly. The next release is scheduled for _${ releaseDate }_ (scheduled code freeze on _${ codeFreezeDate }_).` : ` - Next scheduled release: _${ releaseDate }_. -- Scheduled code freeze: _${ codeFreezeDate }_. -` +${ codeFreezeDate ? `- Scheduled code freeze: _${ codeFreezeDate }_.\n` : '' }` } If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. From d45abc54de520455ec0669b3c1d870bde59bacde Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 22 Jul 2024 15:22:19 -0400 Subject: [PATCH 2/2] Correct name for mu-wpcom plugin --- .../repo-gardening/src/tasks/check-description/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/github-actions/repo-gardening/src/tasks/check-description/index.js b/projects/github-actions/repo-gardening/src/tasks/check-description/index.js index 9152243ceadde..c122026c312df 100644 --- a/projects/github-actions/repo-gardening/src/tasks/check-description/index.js +++ b/projects/github-actions/repo-gardening/src/tasks/check-description/index.js @@ -80,7 +80,7 @@ async function getMilestoneDates( plugin, nextMilestone ) { } } else if ( plugin === 'wpcomsh' ) { releaseDate = 'on demand (usually Mondays if not sooner)'; - } else if ( plugin === 'mu-wpcom-plugin' ) { + } else if ( plugin === 'mu-wpcom' ) { releaseDate = 'WordPress.com Simple releases happen daily'; }