Skip to content

fix(base): default form attachment questions to all files#9

Open
hehanlin1996 wants to merge 1 commit into
mainfrom
ai-fix-20260517-base-form-attachment
Open

fix(base): default form attachment questions to all files#9
hehanlin1996 wants to merge 1 commit into
mainfrom
ai-fix-20260517-base-form-attachment

Conversation

@hehanlin1996
Copy link
Copy Markdown
Owner

Summary

Fixes larksuiteGH-929 feedback C6 for base +form-questions-create attachment questions. Bare attachment questions now send attachment.file_types: ["all"] so forms accept PDFs, Word documents, and other files like the UI does, while explicit attachment or attachment_config input is preserved.

Changes

  • Default attachment questions to attachment.file_types: ["all"] when no attachment config is provided.
  • Include the normalized request body in this shortcut's dry-run output and update the --questions flag help.
  • Add unit coverage for the outgoing stub body and explicit config preservation.
  • Add dry-run E2E coverage and update the base E2E coverage table.

Test Plan

  • Unit tests pass: go test ./shortcuts/base -run 'TestBaseFormQuestions' -count=1
  • Dry-run E2E passes: LARK_CLI_BIN=/tmp/lark-cli-feedback-fix-2026-05-17/lark-cli-base-form-attachment go test ./tests/cli_e2e/base -run TestBaseFormQuestionsCreateDryRun_AttachmentDefaultsAllFiles -count=1
  • Formatting check: gofmt -l shortcuts/base/base_form_questions_create.go shortcuts/base/base_form_execute_test.go tests/cli_e2e/base/base_form_questions_dryrun_test.go produced no output
  • TDD failure confirmed before production code: go test ./shortcuts/base -run 'TestBaseFormQuestionsExecuteCreate/attachment_defaults_to_all_file_types' -count=1 failed before the fix

Related Issues

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.

form-questions-create: attachment 默认只接收图片,缺少文件类型配置参数

1 participant