Skip to content

Conversation

@chrisghill
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors artifact creation and retrieval to use a unified payload field instead of separate data and specs fields, simplifying the artifact data model and aligning with API changes.

Changes:

  • Simplified artifact type from a struct with separate Data/Specs fields to a simple map[string]any
  • Updated GraphQL queries to use payload parameter instead of artifactData and artifactSpecs
  • Updated CreateArtifact API to accept a single payload parameter
  • Modified tests and templates to reference Payload instead of Specs

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/artifact/types.go Changed Artifact type from struct with Data/Specs fields to simple map[string]any
pkg/api/genqlient.graphql Updated createArtifact mutation to use artifactPayload parameter
pkg/api/zz_generated.go Regenerated code reflecting the new payload-based API
pkg/api/artifact.go Updated CreateArtifact function signature to accept single payload parameter
pkg/commands/artifact/import.go Updated to pass artifact as payload to CreateArtifact
pkg/api/artifact_test.go Updated tests to use Payload field and moved TestCreateArtifact from deleted artifacts_test.go
pkg/api/artifacts_test.go Deleted file - test was moved to artifact_test.go
cmd/templates/artifact.get.md.tmpl Updated template to display Payload instead of Specs
cmd/artifact.go Updated rendering logic to format Payload field
pkg/api/schema.graphql Updated schema with new payload field and backward-compatible deprecated specs/data fields

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

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.

2 participants