fix(ci): cast workflow_dispatch inputs for reusable review calls#31
fix(ci): cast workflow_dispatch inputs for reusable review calls#31
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
Review Summary by QodoCast manual dispatch inputs for reusable workflow compatibility
WalkthroughsDescription• Cast workflow_dispatch inputs to proper types before passing to reusable workflows • Apply type casting to pr_number, force_review, and max_parallel parameters • Prevents workflow startup failures due to type mismatches between manual dispatch and reusable workflow calls Diagramflowchart LR
A["workflow_dispatch inputs<br/>string types"] -- "fromJSON + format<br/>casting" --> B["reusable workflow_call<br/>typed inputs"]
C["pr_number"] --> A
D["force_review"] --> A
E["max_parallel"] --> A
File Changes1. .github/workflows/claude-review-manual.yml
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideCasts workflow_dispatch string inputs to their expected typed values before passing them to reusable review workflows, resolving type mismatches while preserving the existing manual dispatch UI. Sequence diagram for manual review workflow_dispatch input castingsequenceDiagram
actor Developer
participant GitHubActions
participant OpencodeReviewManualWorkflow
participant ReusableOpencodeReviewWorkflow
Developer->>GitHubActions: Trigger opencode-review-manual workflow_dispatch
GitHubActions->>OpencodeReviewManualWorkflow: Start workflow with inputs.pr_number, inputs.force_review, inputs.max_parallel (strings)
OpencodeReviewManualWorkflow->>OpencodeReviewManualWorkflow: pr_number_cast = fromJSON(format('{0}', inputs.pr_number))
OpencodeReviewManualWorkflow->>OpencodeReviewManualWorkflow: force_review_cast = fromJSON(format('{0}', inputs.force_review))
OpencodeReviewManualWorkflow->>OpencodeReviewManualWorkflow: max_parallel_cast = fromJSON(format('{0}', inputs.max_parallel))
OpencodeReviewManualWorkflow->>ReusableOpencodeReviewWorkflow: workflow_call with pr_number_cast, force_review_cast, max_parallel_cast
ReusableOpencodeReviewWorkflow-->>OpencodeReviewManualWorkflow: Jobs start successfully with typed inputs
OpencodeReviewManualWorkflow-->>GitHubActions: Report job status
GitHubActions-->>Developer: Display successful run with started jobs
Sequence diagram for manual Claude review workflow_dispatch input castingsequenceDiagram
actor Developer
participant GitHubActions
participant ClaudeReviewManualWorkflow
participant ReusableClaudeReviewWorkflow
Developer->>GitHubActions: Trigger claude-review-manual workflow_dispatch
GitHubActions->>ClaudeReviewManualWorkflow: Start workflow with inputs.pr_number, inputs.force_review (strings)
ClaudeReviewManualWorkflow->>ClaudeReviewManualWorkflow: pr_number_cast = fromJSON(format('{0}', inputs.pr_number))
ClaudeReviewManualWorkflow->>ClaudeReviewManualWorkflow: force_review_cast = fromJSON(format('{0}', inputs.force_review))
ClaudeReviewManualWorkflow->>ReusableClaudeReviewWorkflow: workflow_call with pr_number_cast, force_review_cast
ReusableClaudeReviewWorkflow-->>ClaudeReviewManualWorkflow: Jobs start successfully with typed inputs
ClaudeReviewManualWorkflow-->>GitHubActions: Report job status
GitHubActions-->>Developer: Display successful run with started jobs
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Using
fromJSON(format('{0}', ...))is a good way to coerce types, but make sure the correspondingworkflow_dispatchinputs are markedrequired: trueor have safe defaults, sincefromJSON('')orfromJSON(undefined)will hard-fail at runtime. - The casting pattern for
pr_number,force_review, andmax_parallelis duplicated across the manual workflows; consider extracting this into a single reusable wrapper or aligning both workflows on a shared template to reduce drift and future maintenance overhead.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Using `fromJSON(format('{0}', ...))` is a good way to coerce types, but make sure the corresponding `workflow_dispatch` inputs are marked `required: true` or have safe defaults, since `fromJSON('')` or `fromJSON(undefined)` will hard-fail at runtime.
- The casting pattern for `pr_number`, `force_review`, and `max_parallel` is duplicated across the manual workflows; consider extracting this into a single reusable wrapper or aligning both workflows on a shared template to reduce drift and future maintenance overhead.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
Summary
workflow_dispatchinputs before passing them into reusableworkflow_callinputspr_number,force_review, andmax_parallelWhy
Manual review dispatch runs were failing before jobs started due strict type handling between
workflow_dispatchinputs and reusable workflowworkflow_callinput types.Validation
Summary by Sourcery
CI: