Conversation
|
@shinokada is attempting to deploy a commit to the Themesberg Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughNew GitHub Actions workflow added that triggers on pull_request events (opened, reopened) and runs a job which attempts to convert the current PR back to draft using the GitHub CLI command Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant GitHub as GitHub Events
participant Actions as GitHub Actions Runner
participant GHCLI as gh (GitHub CLI)
GitHub->>Actions: pull_request (opened/reopened)
Actions->>Actions: set GH_TOKEN from GITHUB_TOKEN
Actions->>GHCLI: gh pr ready --undo --repo ${{ github.repository }} --pull-request ${{ github.event.pull_request.number }}
alt CLI succeeds
GHCLI-->>Actions: success (PR converted to draft)
else CLI fails
GHCLI-->>Actions: error
Actions-->>Actions: echo "warning: failed to convert PR to draft" && exit 0
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5–10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/auto-draft.yml (1)
7-15: Add explicit permissions configuration.GitHub Actions workflows should declare explicit permissions rather than relying on default scopes. The
convert-to-draftaction likely requires pull-request write permissions.Apply this diff to add explicit permissions:
name: Auto-convert PRs to draft on: pull_request: types: [opened, reopened] +permissions: + pull-requests: write + jobs: convert-to-draft: runs-on: ubuntu-latestThis follows the principle of least privilege and makes the workflow's permission requirements explicit.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/convert-pr-to-draft.yml(1 hunks)
🔇 Additional comments (1)
.github/workflows/convert-pr-to-draft.yml (1)
1-18: Clarify the team policy intent; the workflow implementation is correct.The
gh pr ready --undocommand is valid and will successfully convert PRs to draft status. However, your review conflates two distinct concerns:
- Workflow implementation: The code is syntactically correct, permissions are appropriate, and the command is valid.
- Policy documentation: The actual gap is explaining why this auto-draft behavior exists.
If your concern is that this represents an undocumented policy change, request the developer clarify in the PR description whether:
- This reflects an agreed team policy
- There's an existing issue or discussion documenting the rationale
- All PRs should follow this behavior or if exceptions apply
The workflow itself requires no code changes.
🔗 Related issue (optional)
Closes #
📑 Description
🔍 PR Type
🚦 PR Status
✅ Checklist
pnpm lint && pnpm check && pnpm test:e2eand all tests passmainbranch (not the published npm version)🧪 Screenshots / Demos (optional)
ℹ️ Additional Information
Summary by CodeRabbit
Note: This release contains no user-facing changes. The update affects internal development workflow automation only.
✏️ Tip: You can customize this high-level summary in your review settings.