Conversation
…w if: conditions Step-level env: overrides are included in the env context when GitHub evaluates the step's if: condition. This caused if: env.INTENT_TYPE == 'fix-reviews' to always be true (because the step itself sets INTENT_TYPE=fix-reviews), so all handler steps ran for every event regardless of actual intent. Fix: remove INTENT_TYPE: <value> from step env: blocks. Scripts read INTENT_TYPE from GITHUB_ENV (set by dev-lead-intent.sh) which has the correct value.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThis PR centralizes the ChangesINTENT_TYPE environment centralization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes dev-lead workflow intent routing by removing step-level INTENT_TYPE overrides that could shadow the classifier output used by if: conditions, and makes the shared review handler fail loudly if the workflow does not provide an intent.
Changes:
- Removed handler step
INTENT_TYPEoverrides from both dev-lead workflows. - Kept routing dependent on
INTENT_TYPEemitted bydev-lead-intent.shviaGITHUB_ENV. - Changed
dev-lead-fix-reviews.shto requireINTENT_TYPEinstead of silently defaulting tofix-reviews.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
scripts/dev-lead-fix-reviews.sh |
Requires workflow-provided INTENT_TYPE before dispatching review-related handler logic. |
.github/workflows/dev-lead.yml |
Removes step-level intent overrides from dev-lead handler steps. |
.github/workflows/dev-lead-reusable.yml |
Applies the same routing fix to the reusable dev-lead workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request updates the scripts/dev-lead-fix-reviews.sh script to make the INTENT_TYPE environment variable mandatory. The script now uses shell parameter expansion to ensure the variable is set by the workflow, preventing it from falling back to a default value. I have no feedback to provide as there were no review comments.
|
Superseded by #187 (clean rebase on main) |
Root cause
Step-level
env:overrides are included in theenvcontext when GitHub evaluates the step'sif:condition. This caused:All handler steps ran for every event regardless of actual intent. When intent was
skip, the scripts would exit 1 because PR_NUMBER/ISSUE_NUMBER were empty.Fix
Remove
INTENT_TYPE:from stepenv:blocks in bothdev-lead.ymlanddev-lead-reusable.yml. The handler scripts already readINTENT_TYPEfromGITHUB_ENV(set bydev-lead-intent.sh).Also change the script fallback from
${INTENT_TYPE:-fix-reviews}to${INTENT_TYPE:?error}so unset INTENT_TYPE is a loud failure rather than a silent wrong value.Summary by CodeRabbit