Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @coryodaniel @massdriver-cloud/platform
* @coryodaniel @chrisghill
7 changes: 6 additions & 1 deletion cmd/definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,18 @@ func runDefinitionPublish(cmd *cobra.Command, args []string) error {
return fmt.Errorf("error initializing massdriver client: %w", mdClientErr)
}

// TODO: All the logic from here to Publish should be moved into the commands package

Copilot AI Jun 21, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Consider addressing this TODO by refactoring the logic into the commands package to improve modularity and maintainability.

Copilot uses AI. Check for mistakes.
def := map[string]any{}
jsonErr := json.Unmarshal(defBytes, &def)
if jsonErr != nil {
return jsonErr
}

_, nameExists := def["name"].(string)
mdBlock, mdExists := def["$md"].(map[string]any)
if !mdExists {
return fmt.Errorf("artifact definition must have a '$md' block with a 'name' field")
}
_, nameExists := mdBlock["name"].(string)
if !nameExists {
return fmt.Errorf("artifact definition must have a 'name' field")
}
Expand Down
Loading