一键导入
review-pr
// Review a Deno runtime pull request for correctness, tests, security, and conventions. Use when asked to review a PR or when a PR number/URL is provided for review.
// Review a Deno runtime pull request for correctness, tests, security, and conventions. Use when asked to review a PR or when a PR number/URL is provided for review.
Run a Node.js compatibility test, diagnose failures, and either fix the implementation, skip, or ignore the test. Use when asked to work on node compat tests.
Format all code in the repository. Run before opening a PR or committing changes.
Triage a Deno GitHub issue — reproduce bugs, classify, label, and comment with findings. Use when asked to triage an issue or when an issue number/URL is provided for triage.
Lint all code (Rust + JS/TS). Use before opening a PR when Rust code was changed.
Lint JS/TS code only. Use before opening a PR when only JavaScript or TypeScript files were changed (no Rust).
| name | review-pr |
| description | Review a Deno runtime pull request for correctness, tests, security, and conventions. Use when asked to review a PR or when a PR number/URL is provided for review. |
| argument-hint | <pr-number-or-url> |
| allowed-tools | Bash(gh *) Bash(git *) Read Glob Grep Agent |
Review PR $ARGUMENTS on the denoland/deno repository.
Fetch the PR metadata, diff, and comments:
gh pr view $ARGUMENTS --json number,title,body,author,labels,state,reviewDecision,commits,files,isDraft,createdAt,url
gh pr diff $ARGUMENTS
gh pr view $ARGUMENTS --comments --json comments
gh pr checks $ARGUMENTS --json name,state,conclusion 2>/dev/null || echo "No checks found"
Before reviewing code, check these gates. If any fail, flag them prominently at the top of your review and do not approve.
ci-test-flaky) can be re-run.type(scope): description. Types: feat,
fix, perf, refactor, chore, docs, test, revert, BREAKING.
Scope examples: ext/node, ext/fetch, cli, lsp, runtime.denoland org member, the PR must link to an issue. If there is no linked
issue, request changes and ask the author to open an issue and discuss the
change first.Read every changed file in the diff. Use the repo tools (Read, Grep, Glob)
to understand surrounding context when needed.
.unwrap() on user-controlled data?unsafe without strong justification. No command injection,
path traversal, or permission bypasses.ext/node/ especially — Node.js APIs sometimes assume full access.ext/node/): Does the implementation match Node.js
behavior? Check against Node.js docs and/or source code.globalThis.__bootstrap.primordials) to avoid prototype pollution. Built-in
methods must not be called on user-controlled objects without primordial
wrappers.tests/specs/ using __test__.jsonc. Use [WILDCARD] for
non-deterministic output, [UNORDERED_START]/[UNORDERED_END] for
non-deterministic ordering.Pay extra attention to changes in:
runtime/permissions.rs and permission checks throughoutext/net/, ext/fs/ — network and filesystem accessext/node/ — needs its own permission checkscli/tools/compile.rs — standalone binary compilationApply additional checks based on the PR type:
ext/node/): Verify behavior against Node.js docs and/or
source code, not just what "seems right". New polyfills must be registered in
ext/node/polyfills/01_require.js.ci-wpt-test
label if not present.@bartlomieju review — do not approve these
yourself.Post a review using gh pr review. Structure:
nit: prefix for non-blocking suggestions. Suggest fixes when
possible, not just "this is wrong."Prefer inline comments on specific lines where possible. Use a single review with both a summary body and inline comments:
gh api repos/denoland/deno/pulls/{number}/reviews -f event=COMMENT -f body="summary" -f comments='[{"path":"file.rs","line":42,"body":"comment"}]'
Use event=APPROVE or event=REQUEST_CHANGES as appropriate instead of
COMMENT.
For simple reviews without inline comments, fall back to:
gh pr review $ARGUMENTS --comment --body "review text"
You do NOT have merge permissions. When a PR is ready:
@bartlomieju LGTM, needs maintainer signoff (first-time contributor)@bartlomieju this is ready to merge