CI: Use Danger to safeguard against forgotten cherrypicks#35171
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Danger CI guard to prevent merging release PRs with unfinished checklist items, and tweaks the generated release PR description to reduce manual checkbox work during the release process.
Changes:
- Add a Danger.js check that fails release PRs when any unchecked markdown tasks (
- [ ]) remain in the PR body. - Update release PR description generation to use bullet points (instead of checkboxes) for changelist PR entries.
- Adjust cherry-pick command formatting in the generated checklist.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/release/generate-pr-description.ts | Reduces checkbox usage in generated changelists; formats manual cherry-pick items. |
| scripts/dangerfile.js | Adds a release-PR-only checklist completeness gate to CI via Danger. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds a ChangesRelease PR Checklist Validation and Description Formatting
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
Comment |
bbf8885 to
4ab40fc
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/sustainability/scratch/baseline-stats.ts`:
- Line 11: The run command in the comment on line 11 uses `node scripts/...`
format, but the repository convention requires `node ./...` format for
TypeScript scripts. Update the command from `GH_TOKEN=$(gh auth token) node
scripts/sustainability/scratch/baseline-stats.ts` to use `node
./scripts/sustainability/scratch/baseline-stats.ts` to align with the native
Node `.ts` execution convention.
- Around line 71-73: The timelineItems queries for ISSUE_COMMENT at lines 71,
83, and 107-116 only fetch the first COMMENTS_PER_ITEM (100) items without
pagination, causing undercounting of external participants for items with more
than 100 comments. Implement cursor-based pagination for each of these three
timelineItems query blocks by adding pageInfo (with hasNextPage and endCursor)
to the query structure, then implement pagination logic to repeatedly fetch
additional pages using the after parameter with the endCursor until hasNextPage
is false, accumulating all comment authors across all pages into a single
collection for each node.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 31eb1b09-c0f1-4ca8-b4a8-166d04d09ba3
📒 Files selected for processing (3)
scripts/dangerfile.jsscripts/release/generate-pr-description.tsscripts/sustainability/scratch/baseline-stats.ts
✅ Files skipped from review due to trivial changes (1)
- scripts/release/generate-pr-description.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- scripts/dangerfile.js
3cdf66e to
8cb51bf
Compare
What I did
Checklist for Contributors
Testing
Manual testing
Documentation
N/A
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit