Conversation
…in-pr
The mention-in-pr.lock.yml referenced steps.sanitized.outputs.text but was
missing the "Compute current body text" step (id: sanitized) that calls
compute_text.cjs to extract and sanitize the comment body from the event
payload. This caused the Request field in prompts to always be empty ("").
Root cause: The gh-aw compiler did not generate the sanitized step because
steps.sanitized.outputs.text was used in a compound expression
(inputs.prompt || steps.sanitized.outputs.text) rather than standalone.
Changes:
- .md source: Split compound expression into two separate lines so the
compiler generates the sanitized step on next recompile
- .lock.yml: Manually add the missing sanitized step and activation outputs
(matching the pattern from mention-in-pr-no-sandbox.lock.yml)
Fixes #467
Co-authored-by: strawgate <6384545+strawgate@users.noreply.github.com>
📝 WalkthroughWalkthroughAdds a sanitized compute step that produces three outputs: body, text, and title. These outputs are exported from the activation job and wired into downstream steps and template substitutions so the sanitized text and title are used for prompt construction; the original input prompt is exposed separately as "Explicit prompt." No other public signatures changed. Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/gh-aw-mention-in-pr.lock.yml (1)
47-47: Regenerate the lockfile from source before merge.Since this is generated output, run the compiler and commit the regenerated
.lock.ymlto avoid source/lock drift from manual edits.Based on learnings,
.github/workflows/*.lock.ymlfiles in this repository are generated via compile and direct edits can be overwritten.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/gh-aw-mention-in-pr.lock.yml at line 47, The lockfile .github/workflows/gh-aw-mention-in-pr.lock.yml is generated and must be regenerated from the source before merging: run the project’s workflow-generation/compile step (the same command used to produce .github/workflows/*.lock.yml in CI), overwrite the existing gh-aw-mention-in-pr.lock.yml with the newly generated output, verify the generated file contains the expected changes, and commit/push that regenerated .lock.yml so the committed lock matches the source output.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/gh-aw-mention-in-pr.lock.yml:
- Line 47: The lockfile .github/workflows/gh-aw-mention-in-pr.lock.yml is
generated and must be regenerated from the source before merging: run the
project’s workflow-generation/compile step (the same command used to produce
.github/workflows/*.lock.yml in CI), overwrite the existing
gh-aw-mention-in-pr.lock.yml with the newly generated output, verify the
generated file contains the expected changes, and commit/push that regenerated
.lock.yml so the committed lock matches the source output.
There was a problem hiding this comment.
Verdict: APPROVE. No actionable findings after review.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
This PR fixes empty
Requestcontext in themention-in-prworkflow by ensuring sanitized event text is always computed and used in the prompt.Root cause
In
gh-aw-mention-in-pr.md, the request used a compound expression:- **Request**: "$\{\{ inputs.prompt || steps.sanitized.outputs.text }}"The compiler did not recognize this pattern for generating the
sanitizedstep, so the compiled lock workflow could miss that step and produce an empty request context.What changed
.github/workflows/gh-aw-mention-in-pr.mdto use:Requestfrom$\{\{ steps.sanitized.outputs.text }}Explicit promptfrom$\{\{ inputs.prompt }}.github/workflows/gh-aw-mention-in-pr.lock.ymlto include:Compute current body text(id: sanitized) runningcompute_text.cjssteps.sanitized.outputs(body,text,title)This aligns
mention-in-prwith the working pattern used by the other mention workflows and restores correct request context behavior.Related issue: #467