fix(review-pr): add missing ACTION_PATH env var to filter-diff and score-risk steps#193
Merged
Merged
Conversation
… steps
Both the 'Filter excluded paths from diff' and 'Score file risk' steps
used $ACTION_PATH in their run: blocks but never declared it in their
env: sections. This causes 'unbound variable' errors under set -euo pipefail.
Add ACTION_PATH: ${{ github.action_path }} to the env: block of both steps,
matching the pattern already used by other steps in the same file.
derekmisler
previously approved these changes
May 7, 2026
…cquisition 'Ensure cache directory exists' and 'Restore reviewer memory' were positioned after the diff-processing pipeline (~line 548), meaning any failure in Filter excluded paths, Split diff, Score file risk, or Generate file history would silently skip the memory restore — so the agent would run without its learned history. Move both steps to run immediately after 'Save review lock' (before 'Add eyes reaction' and 'Get PR information'), where they execute as soon as the lock is acquired and nothing in the diff pipeline can preemptively skip them. Their existing if: condition (steps.lock-check.outputs.skip != 'true') is preserved unchanged.
derekmisler
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two steps in
review-pr/action.ymlreferenced$ACTION_PATHin theirrun:shell block but never declared it as anenv:variable:node "$ACTION_PATH/dist/filter-diff.js"butACTION_PATHwas not inenv:node "$ACTION_PATH/dist/score-risk.js"butACTION_PATHwas not inenv:Under
set -euo pipefail(or wheneverACTION_PATHhappens to be unset in the runner environment) this causes anunbound variableerror and the step fails.Fix
Add
ACTION_PATH: ${{ github.action_path }}to theenv:section of both steps, matching the pattern already used correctly by several other steps in the same file (e.g. the feedback step at ~line 629, the agent-run steps at ~lines 729 and 742).Validation
pnpm lintpasses (Biome CI, tsc --noEmit, actionlint) ✅