Skip to content

fix(ci): cast workflow_dispatch inputs for reusable review calls#31

Merged
Mehdi-Bl merged 1 commit intomainfrom
fix/manual-review-input-casting
Feb 15, 2026
Merged

fix(ci): cast workflow_dispatch inputs for reusable review calls#31
Mehdi-Bl merged 1 commit intomainfrom
fix/manual-review-input-casting

Conversation

@Mehdi-Bl
Copy link
Copy Markdown
Contributor

@Mehdi-Bl Mehdi-Bl commented Feb 15, 2026

Summary

  • cast workflow_dispatch inputs before passing them into reusable workflow_call inputs
  • apply casts to pr_number, force_review, and max_parallel
  • keep typed manual dispatch UI while avoiding startup workflow-file failures

Why

Manual review dispatch runs were failing before jobs started due strict type handling between workflow_dispatch inputs and reusable workflow workflow_call input types.

Validation

  • actionlint on updated wrapper workflows
  • diagnostic runs confirmed jobs start once casts are applied

Summary by Sourcery

CI:

  • Adjust manual review GitHub Actions workflows to cast workflow_dispatch inputs (PR number, force_review, max_parallel) before passing them to reusable workflow_call inputs.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

Review Summary by Qodo

Cast manual dispatch inputs for reusable workflow compatibility

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• 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
Diagram
flowchart 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
Loading

Grey Divider

File Changes

1. .github/workflows/claude-review-manual.yml 🐞 Bug fix +2/-2

Add type casting for manual dispatch inputs

• Cast pr_number input using fromJSON(format('{0}', inputs.pr_number))
• Cast force_review input using fromJSON(format('{0}', inputs.force_review))
• Ensures type compatibility with reusable workflow call parameters

.github/workflows/claude-review-manual.yml


2. .github/workflows/opencode-review-manual.yml 🐞 Bug fix +3/-3

Add type casting for all manual dispatch inputs

• Cast pr_number input using fromJSON(format('{0}', inputs.pr_number))
• Cast force_review input using fromJSON(format('{0}', inputs.force_review))
• Cast max_parallel input using fromJSON(format('{0}', inputs.max_parallel))
• Resolves type mismatch issues between workflow_dispatch and workflow_call

.github/workflows/opencode-review-manual.yml


Grey Divider

Qodo Logo

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Feb 15, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Casts 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 casting

sequenceDiagram
  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
Loading

Sequence diagram for manual Claude review workflow_dispatch input casting

sequenceDiagram
  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
Loading

File-Level Changes

Change Details Files
Cast manual dispatch inputs to correctly typed values for reusable review workflows to avoid type errors at startup.
  • Wrap pr_number workflow_dispatch input in fromJSON(format('{0}', ...)) when passing into the reusable opencode review workflow
  • Wrap force_review workflow_dispatch input in fromJSON(format('{0}', ...)) when passing into the reusable opencode review workflow
  • Wrap max_parallel workflow_dispatch input in fromJSON(format('{0}', ...)) when passing into the reusable opencode review workflow
  • Apply the same fromJSON(format('{0}', ...)) casting pattern to pr_number and force_review in the manual Claude review workflow, matching the reusable workflow_call input types
.github/workflows/opencode-review-manual.yml
.github/workflows/claude-review-manual.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • 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.
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.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@Mehdi-Bl Mehdi-Bl merged commit 40880c7 into main Feb 15, 2026
9 checks passed
@Mehdi-Bl Mehdi-Bl deleted the fix/manual-review-input-casting branch February 15, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant