diff --git a/.github/actions/check_changesets/check_changesets.mjs b/.github/actions/check_changesets/check_changesets.mjs index d012b019f0d3..334b23bf9455 100644 --- a/.github/actions/check_changesets/check_changesets.mjs +++ b/.github/actions/check_changesets/check_changesets.mjs @@ -11,6 +11,14 @@ async function main() { return } + // We only enforce changesets on PRs that are not marked as "chore" or "SSR" or "RSC" + const skipOnMilestone = ['chore', 'SSR', 'RSC'] + const { milestone } = github.context.payload.pull_request + if (milestone && skipOnMilestone.includes(milestone.title)) { + console.log(`Skipping check because of the "${milestone.title}" milestone`) + return + } + // Check if the PR adds a changeset. await exec('git fetch origin main', [], { silent: true }) const { stdout } = await getExecOutput('git diff origin/main --name-only', [], { silent: true }) diff --git a/.github/workflows/check-changelog.yml b/.github/workflows/check-changelog.yml index b50623f54571..d854c06298c5 100644 --- a/.github/workflows/check-changelog.yml +++ b/.github/workflows/check-changelog.yml @@ -2,7 +2,7 @@ name: 📝 Check changesets on: pull_request: - types: [opened, synchronize, reopened, labeled, unlabeled] + types: [opened, synchronize, reopened, labeled, unlabeled, milestoned, demilestoned] # Cancel in-progress runs of this workflow. # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow.