Skip to content

Commit

Permalink
chore(ci): do not enforce changeset entry for certain milestones (#10858
Browse files Browse the repository at this point in the history
)

Right now the check will enforce a changeset entry for any PR. We have
noticed this can be a bit excessive for the current RSC/SSR work. These
features are not scheduled for stable release in the near future and so
requiring a changeset on every related PR can produce changesets which
are of little value - descriptions of fixes for features that have never
been released in stables.
  • Loading branch information
Josh-Walker-GM authored Jun 19, 2024
1 parent e701712 commit 45a2d57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/actions/check_changesets/check_changesets.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 45a2d57

Please sign in to comment.