Conversation
…USE-003) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/eaa97989-67eb-4c84-8a62-004770e579fe
There was a problem hiding this comment.
Pull request overview
This PR updates PR-review-related safe-output handlers to emit a 🎭 staged-mode preview indicator (USE-003) when running in staged/dry-run mode, aligning them with existing staged preview logging used elsewhere.
Changes:
- Re-export
logStagedPreviewInfoviasafe_output_helpers.cjs. - Add staged-mode 🎭 preview logging to
create_pr_review_comment.cjswhen staged is enabled. - Add staged-mode 🎭 preview logging to
submit_pr_review.cjswhen staged is enabled.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| actions/setup/js/submit_pr_review.cjs | Logs 🎭 staged preview info when staged mode is enabled for PR review submission buffering. |
| actions/setup/js/safe_output_helpers.cjs | Re-exports logStagedPreviewInfo for broader handler access. |
| actions/setup/js/create_pr_review_comment.cjs | Logs 🎭 staged preview info when staged mode is enabled for PR review comment buffering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Propagate per-handler staged flag to the shared PR review buffer | ||
| if (config.staged === true) { | ||
| buffer.setStaged(true); | ||
| logStagedPreviewInfo("PR review will be previewed without being submitted"); | ||
| } |
There was a problem hiding this comment.
Staged mode detection here only checks config.staged === true, so the 🎭 preview indicator will not be logged when staged mode is enabled globally via GH_AW_SAFE_OUTPUTS_STAGED. The codebase has a canonical helper for consistent detection (isStagedMode in actions/setup/js/safe_output_helpers.cjs), which includes both the env var and per-handler config. Consider using isStagedMode(config) to decide when to call logStagedPreviewInfo (and optionally when to set the buffer staged flag).
| // Propagate per-handler staged flag to the shared PR review buffer | ||
| if (config.staged === true) { | ||
| buffer.setStaged(true); | ||
| logStagedPreviewInfo("PR review comments will be previewed without being submitted"); | ||
| } |
There was a problem hiding this comment.
This staged-mode branch only triggers when config.staged === true, so if staged mode is enabled via the global GH_AW_SAFE_OUTPUTS_STAGED env var, the handler won’t emit the required 🎭 preview indicator. The repo provides isStagedMode(config) in actions/setup/js/safe_output_helpers.cjs to ensure consistent staged detection across handlers (env var OR per-handler flag). Consider switching the condition to isStagedMode(config) for the preview log (and decide separately whether the buffer’s per-handler staged flag should be set).
|
@copilot review comments |
…l env var Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/cc74daba-05ff-43a1-a371-f1af5f87dc80
Fixed in d819ce4. Both |
Conformance check USE-003 requires all handlers with staged mode to include a
🎭visual indicator distinguishing dry-run output from live output. Three handlers delegated staged behavior topr_review_buffer.cjs(which already had the emoji) but the per-file checker didn't follow that delegation, causing failures.Changes
safe_output_helpers.cjs: Imports and re-exportslogStagedPreviewInfofromstaged_preview.cjs, making it accessible to any handler already importing from this shared module.create_pr_review_comment.cjs: ImportslogStagedPreviewInfoand calls it whenconfig.staged === trueis set on the buffer.submit_pr_review.cjs: Same pattern as above.📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.