Conversation
There was a problem hiding this comment.
Pull request overview
This PR extracts blueprint directory zipping (with .blueprintignore support) into a new public Go package (blueprint) and standardizes CLI string-flag whitespace trimming via a shared cliflags.TrimSpaceAction helper.
Changes:
- Move blueprint zip/ignore logic into
blueprint.Zip(fs.FS)and wire CLI usage through it. - Add
cliflags.TrimSpaceActionand apply it to various string flags (device/rule/connection). - Remove the
bp/example blueprint files.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/app/enaptercli/execute.go | Switches zipDir implementation to call the new blueprint.Zip helper. |
| internal/app/enaptercli/cmd_rule_engine_rule_update.go | Trims whitespace for the --slug flag via cliflags. |
| internal/app/enaptercli/cmd_rule_engine_rule_create.go | Trims whitespace for the required --slug flag via cliflags. |
| internal/app/enaptercli/cmd_device_update.go | Trims whitespace for --name and --slug flags via cliflags. |
| internal/app/enaptercli/cmd_device_create_standalone.go | Trims whitespace for device name/slug flags via cliflags. |
| internal/app/enaptercli/cmd_device_create_lua_device.go | Trims whitespace for device name/slug flags via cliflags. |
| internal/app/enaptercli/cmd_connection_add.go | Trims whitespace for required --name via cliflags. |
| internal/app/cliflags/trim.go | Introduces reusable flag Action for strings.TrimSpace. |
| blueprint/zip.go | New public package implementing zip + .blueprintignore support. |
| bp/manifest.yml | Removes old example blueprint manifest. |
| bp/firmware.lua | Removes old example blueprint firmware. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR extracts blueprint directory zipping (with .blueprintignore support) into a new public Go package (blueprint) and standardizes whitespace-trimming for various CLI string flags via a reusable cliflags helper.
Changes:
- Move blueprint directory zipping logic from
internal/app/enaptercliinto new public packageblueprintand update upload command to use it. - Add
cliflags.TrimSpaceActionand apply it to multiple CLI string flags (device/rule/connection slugs and names). - Remove the top-level
bp/sample blueprint files.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/app/enaptercli/execute.go | Removes inlined blueprint zip/ignore implementation now moved to public package. |
| internal/app/enaptercli/cmd_blueprint_upload.go | Switches directory zipping to blueprint.Zip(os.DirFS(...)). |
| blueprint/zip.go | New public package implementing blueprint zipping with .blueprintignore. |
| internal/app/cliflags/trim.go | Adds reusable trimming Action for urfave/cli string flags. |
| internal/app/enaptercli/cmd_connection_add.go | Trims whitespace for connection name flag input. |
| internal/app/enaptercli/cmd_device_update.go | Moves trimming to flag Action for name/slug; payload now uses already-trimmed values. |
| internal/app/enaptercli/cmd_device_create_standalone.go | Trims device name/slug inputs via flag Action. |
| internal/app/enaptercli/cmd_device_create_lua_device.go | Trims device name/slug inputs via flag Action. |
| internal/app/enaptercli/cmd_rule_engine_rule_create.go | Trims rule slug input via flag Action. |
| internal/app/enaptercli/cmd_rule_engine_rule_update.go | Trims rule slug input via flag Action. |
| bp/manifest.yml | Removes sample blueprint manifest. |
| bp/firmware.lua | Removes sample blueprint firmware. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.