fix: resolve release drafter permissions and publish workflow issues - #16
Conversation
- Add job-level permissions (contents: write, pull-requests: read) to release-drafter workflow to fix 'Resource not accessible by integration' error - Remove deprecated include-pre-releases field from release-drafter config - Remove unnecessary master branch and pull_request trigger from release-drafter - Fix publish job step order: sync version before build so npm pack validates correct version - Add passWithNoTests to vitest config to prevent CI failure when no test files exist - Bump package.json version to 1.0.0 to match VERSION file
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe changes update release-drafter configuration and permissions, synchronize the package version before publishing, set the package version to ChangesRelease and validation updates
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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: 3
🤖 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 @.github/release-drafter.yml:
- Line 85: Remove the trailing blank lines at the end of the YAML configuration
so the file ends immediately after its final content and satisfies YAMLlint’s
empty-lines rule.
In @.github/workflows/release-drafter.yml:
- Around line 16-18: Add explanatory comments directly above the job-level
permissions entries in the release-drafter workflow, documenting why contents:
write and pull-requests: read are required. Keep the existing permission values
unchanged and clearly describe their security scope for zizmor auditing.
In `@vitest.config.ts`:
- Line 6: Update the Vitest configuration by removing passWithNoTests: true, or
otherwise configure Vitest to fail when no test files are discovered, so the npm
test check in version-release.yml cannot pass without executing tests.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 8af7857b-63f5-426b-8104-9fb760d0faef
📒 Files selected for processing (5)
.github/release-drafter.yml.github/workflows/release-drafter.yml.github/workflows/version-release.ymlpackage.jsonvitest.config.ts
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
AOSSIE-Org/ThruBox-Server(manual)
- Document job-level permissions to address zizmor warning - Remove trailing blank lines to pass YAML empty-lines rule
Addressed Issues:
Fixes #(issue number)
Description
This PR resolves the GitHub Actions deployment issues for the npm package publish workflow and fixes errors in the Release Drafter configuration.
Key changes include:
contents: write,pull-requests: read) to therelease-drafter.ymlworkflow.version-release.yml, moved thenpm versionsync step to execute before the build andnpm pack --dry-runsteps. This ensures the correct version is packed and validated.passWithNoTests: truetovitest.config.ts. Without this, the requirednpm teststep in the publish job would exit with a failure code when no test files exist.include-pre-releasesfield from.github/release-drafter.ymland cleaned up unnecessary workflow triggers.package.jsonto1.0.0to match theVERSIONfile for the initial public release.Screenshots/Recordings:
N/A - CI/CD workflow fixes.
Additional Notes:
VERSIONfile onmainwill correctly trigger the publishing workflow to npm asv1.0.0.NPMJS_TOKENsecret is configured in the repository settings with a valid npm automation token.Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.
Summary by CodeRabbit
Release
Bug Fixes
Chores