Skip to content

Add non-empty validation to workflow intent field in interactive.go - #21638

Closed
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/add-non-empty-validation-intent-field
Closed

pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/add-non-empty-validation-intent-field

Conversation

Copilot AI commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

The huh.NewText() intent field in the interactive workflow builder lacked validation, accepting empty or trivially short input while the workflow name field already enforced non-empty input via Validate().

What's in place

  • pkg/cli/validators.go — ValidateWorkflowIntent function rejecting empty/whitespace-only input ("workflow instructions cannot be empty") and inputs under 20 characters ("please provide at least 20 characters of instructions")
  • pkg/cli/interactive.go — Intent field wired to the validator:
    huh.NewText().
        Title("Describe what this workflow should do:").
        Value(&b.Intent).
        Validate(ValidateWorkflowIntent),
  • pkg/cli/validators_test.go — TestValidateWorkflowIntent and TestValidateWorkflowIntent_EdgeCases covering empty, whitespace-only, too-short, and valid inputs

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI linked an issue Mar 18, 2026 that may be closed by this pull request
1 of 5 tasks
Copilot AI changed the title [WIP] [plan] Add non-empty validation to workflow intent field Add non-empty validation to workflow intent field in interactive.go Mar 18, 2026
Copilot AI requested a review from pelikhan March 18, 2026 19:22
@pelikhan
pelikhan marked this pull request as ready for review March 18, 2026 20:48
Copilot AI review requested due to automatic review settings March 18, 2026 20:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@pelikhan pelikhan closed this Mar 18, 2026
@github-actions
github-actions Bot deleted the copilot/add-non-empty-validation-intent-field branch April 2, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Add non-empty validation to workflow intent field in interactive.go

3 participants