From 88de37b2bbd1df22e7420813bec2634251f6fd0d Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Wed, 5 Apr 2023 17:54:22 +0800 Subject: [PATCH 1/2] Update dangerfile temporarily to check for patch label --- scripts/dangerfile.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/dangerfile.ts b/scripts/dangerfile.ts index 8d04e2c28472..3c8019fed2f1 100644 --- a/scripts/dangerfile.ts +++ b/scripts/dangerfile.ts @@ -1,6 +1,7 @@ /* eslint-disable import/extensions */ import { fail, danger } from 'danger'; import { execSync } from 'child_process'; +import { dedent } from 'ts-dedent'; execSync('npm install lodash'); @@ -20,6 +21,23 @@ const Versions = { const branchVersion = Versions.MINOR; const checkRequiredLabels = (labels: string[]) => { + if (!labels.includes('patch')) { + fail(dedent` + A 'patch' label is required to merge during stabilization. + + Patch PRs are small bug fixes, build updates, and documentation changes. + They do not include new features or more disruptive bugfixes. + + These changes will be first released on 7.1-alpha, then patched back to 'main' + after they have been verified to be correct and released as 7.0.x patch releases. + + After the stabilization period ends (ETA 2023-04-12), the 'patch' label + will no longer be required to merge into next, and we will merge ALL accepted + PRs to 'next' and release them on 7.1-alpha. Patch PRs will be + patched back to 'main' and released in 7.0.x patch releases. + `); + } + const forbiddenLabels = flatten([ 'ci: do not merge', 'in progress', From e82148fd61319a166cce539d838be05c0a17147d Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Wed, 5 Apr 2023 18:03:57 +0800 Subject: [PATCH 2/2] Install ts-dedent --- scripts/dangerfile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dangerfile.ts b/scripts/dangerfile.ts index 3c8019fed2f1..ee47ecb0eb77 100644 --- a/scripts/dangerfile.ts +++ b/scripts/dangerfile.ts @@ -1,13 +1,13 @@ /* eslint-disable import/extensions */ import { fail, danger } from 'danger'; import { execSync } from 'child_process'; -import { dedent } from 'ts-dedent'; -execSync('npm install lodash'); +execSync('npm install lodash ts-dedent'); const flatten = require('lodash/flatten.js'); const intersection = require('lodash/intersection.js'); const isEmpty = require('lodash/isEmpty.js'); +const { dedent } = require('ts-dedent'); const pkg = require('../code/package.json'); // eslint-disable-line import/newline-after-import const prLogConfig = pkg['pr-log'];