Skip to content

feat(workflows): add workflow_dispatch with free-text prompt to claude-code template - #263

Merged
edenreich merged 3 commits into
mainfrom
fix/issue-261
Jul 14, 2026
Merged

edenreich merged 3 commits into
mainfrom
fix/issue-261

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Resolves #261

Summary

Adds workflow_dispatch with a free-text prompt input to the generated Claude Code workflow template, mirroring the pattern already present in the Infer workflow and the org .github reusable workflows. Users can now open the workflow in the GitHub Actions UI, click "Run workflow", and type any task they want - an empty prompt falls back to the existing issue/comment-triggered behavior.

Changes

  • Added workflow_dispatch trigger with a free-text prompt string input (not required) to the claude-code workflow template
  • Updated the job condition to include github.event_name == 'workflow_dispatch'
  • Added a "Set prompt" step that passes the user's free-text prompt to the claude-code-action when provided, or leaves it empty to fall back to issue/comment mode
  • Updated tests to verify the new workflow_dispatch trigger, prompt input, and prompt wiring
  • The Infer workflow already had workflow_dispatch with prompt wired through - no changes needed there

@edenreich
edenreich marked this pull request as ready for review July 14, 2026 16:36
@edenreich
edenreich requested a review from a team as a code owner July 14, 2026 16:36
@edenreich

Copy link
Copy Markdown
Contributor

@infer Can you fix the CI - it's failing.

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Model: ollama_cloud/deepseek-v4-flash · View Job

Todos

  • Run tests to see what's failing in CI
  • Fix template line 130: escape ${{ }} GitHub Actions expression for Go templates
  • Fix test line 310: expect --effort max instead of --effort ultracode
  • Fix test line 315: expect track_progress expression instead of true
  • Run tests to verify fixes
  • Commit and push fixes

Pull Request

#263

✅ Infer Result: Success

Fixed the CI failure in PR #263 by escaping the ${{ github.event_name != 'workflow_dispatch' }} GitHub Actions expression in the claude-code template (Go's text/template was interpreting the unescaped {{ }} as a template action, causing function "github" not defined), and updated two test assertions that were out of sync with the template (--effort ultracode → --effort max, and track_progress: true → the actual GitHub Actions expression).

Model: ollama_cloud/deepseek-v4-flash · Exit Code: 0 · Duration: 1m 59s

Tokens: 980,163 in · 6,992 out · 987,155 total (22 requests)

Tool calls: 31 total · 90% success rate

⚠️ 3 failed tool call(s)
  • Bash:
    exit status 1: === RUN   TestGenerator_AI_ClaudeWorkflowGoContent
    ✅ Generated: /tmp/TestGenerator_AI_ClaudeWorkflowGoContent3645690771/001/out/main.go
    … (truncated)
    
  • Bash:
    exit status 1: === RUN   TestGenerator_AI_ClaudeWorkflowRustContent
    ✅ Generated: /tmp/TestGenerator_AI_ClaudeWorkflowRustContent895653258/001/out/Taskfile.yml
    … (truncated)
    
  • Bash:
    exit status 1: bash: line 1: The track_progress line used unescaped ${{ }} which Go's text/template interpreted as a template action, causing 'function github not defined' at render time. Escaped it with the same backtick pattern used elsewhere in the template.: bad substitution
    

Triggered by edenreich · Infer Action

The track_progress line used unescaped dollar-brace-brace which Go text/template interpreted as a template action, causing function github not defined at render time. Escaped it with the same backtick pattern used elsewhere in the template.

Also fixed test assertions: --effort ultracode to --effort max (template was updated but test wasnt), and track_progress: true to the GitHub Actions expression (the expression, not a static value).
@edenreich
edenreich merged commit 012a227 into main Jul 14, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-261 branch July 14, 2026 16:41
inference-gateway-releaser Bot added a commit that referenced this pull request Jul 14, 2026
## [0.47.0](v0.46.5...v0.47.0) (2026-07-14)

### ✨ Features

* generate infer-action workflow for infer orchestrator ([#262](#262)) ([66c526a](66c526a))
* **workflows:** add workflow_dispatch with free-text prompt to claude-code template ([#263](#263)) ([012a227](012a227))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.47.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add workflow_dispatch free-text prompt to generated claude-code and infer-action workflows

1 participant