-
Notifications
You must be signed in to change notification settings - Fork 26
Add --nonInteractive flag for replay mode with automated defaults #1250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Apollon77 <11976694+Apollon77@users.noreply.github.com>
Apollon77
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Also add a test for this. Maybe integrate into the create template tests and reuse a file from a fully generated template, remove one required and one choice-with-default and one optional one and verify that the generated result is as expected
You also missed changelog entry again
Co-authored-by: Apollon77 <11976694+Apollon77@users.noreply.github.com>
Added test for non-interactive mode in
Also added CHANGELOG entry referencing #1249. Commit: b5c114b |
|
@copilot please check the test again because it failed in CI: see https://github.com/ioBroker/create-adapter/actions/runs/19204423115/job/54898486956?pr=1250#step:8:1918 |
Co-authored-by: Apollon77 <11976694+Apollon77@users.noreply.github.com>
Fixed the test error handling. The issue was that the test didn't check if the replay file exists before trying to read it, and error output wasn't being captured properly with Changes:
Commit: 3dd9635 |
|
@copilot it seems the issue is still not fixed because the create-adapter bib´nary file is expected on a wrong pace when executed in CI via the shell script: see
ther is a ".github" too much in the path |
Co-authored-by: Apollon77 <11976694+Apollon77@users.noreply.github.com>
... Fixed the path issue. The test script runs from Changed binary path from: path.join(process.cwd(), "bin", "create-adapter.js")To: path.join(process.cwd(), "..", "bin", "create-adapter.js")This correctly resolves to Commit: 6e2b7f9 |
Co-authored-by: Apollon77 <11976694+Apollon77@users.noreply.github.com>
PR Checklist:
npm run buildnpm test.github/create_templates.ts)docs/updatesexplaining what the user needs to do when manually updating an existing projectCHANGELOG.md(referencing the migration description and this PR or the issue you fixed)Description:
When using
--replaywith older.create-adapter.jsonfiles, new questions added in newer versions prompt the user interactively, blocking automated regeneration workflows.Changes
--nonInteractiveflag (alias-y) to suppress prompts during replayinitialvalues when available, empty string for optional fields, fail for required fields without defaultsconvertInitialToValue()to properly resolve select/multiselect indices (e.g.,[0]→["ESLint"]).github/create_templates.tsthat:startMode(required with default),tools(choice with default), anddescription(optional)package.jsonandsrc/main.tsare created successfully__WORK IN PROGRESS__sectionUsage
Enables CI/CD workflows to regenerate adapters from replay files without manual intervention.
Testing
Fixes #1249
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.