Post ambient session results back to GitHub issues#14
Conversation
- Wait for ACP session to complete before exiting - Post session phase and result as a comment on the issue - Add issues: write permission for commenting - Show result in a collapsible details block Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting WalkthroughWorkflow permissions now include Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Actions Workflow
participant Action as ambient-action (session)
participant Post as Post-result step
participant GH as GitHub Issues (gh CLI)
Workflow->>Action: invoke ambient-action (wait: 'true', timeout: '300')\n(id: session)
Action-->>Workflow: session outputs (session-name, session-phase, session-result)
Workflow->>Post: always() step reads session outputs
Post->>Post: map phase to emoji/status\nformat comment body (optional <details>)
Post->>GH: gh issue comment (GH_TOKEN: github.token)
GH-->>Post: comment created
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ambient.yml:
- Around line 48-58: SESSION_RESULT is being interpolated directly into BODY
which can cause shell injection or syntax breaks; instead stop expanding it
inside the double-quoted string and write the message body safely — either build
the BODY using a quoted heredoc (e.g., <<'EOF') to prevent expansion or write
SESSION_RESULT to a temporary file and pass that file via --body-file; update
the places that set BODY and the caller that uses SESSION_RESULT (references:
SESSION_RESULT, BODY, and the consumer using --body-file) to use one of these
safe methods.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: b2390acd-3f66-43c0-95d9-50b9a2feab71
📒 Files selected for processing (1)
.github/workflows/ambient.yml
Use --body-file instead of interpolating SESSION_RESULT into a shell string, which could break on backticks or $() in output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
wait: 'true', 30min timeout)issues: writepermission for theGITHUB_TOKEN<details>blockTest plan
@ambient describe what this repo doeson an issue🤖 Generated with Claude Code