Merged
Conversation
User prompts: - "update mass pkg get's query to fetch this additional detail. in the mass pkg get standard output just show the latest/active deployment id / status / version / created at." Changes: - Add latestDeployment, activeDeployment, deployedVersion to getPackage GraphQL query - Add PackageDeployment struct and new fields to Package model - Update package.get.md.tmpl to display deployment info in text output - Nil-out empty deployments from mapstructure decoding Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
chrisghill
approved these changes
Mar 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the package API surface (and CLI output) to include the last deployed bundle version plus “latest” and “active” deployment summaries, by updating the getPackage GraphQL selection set and the corresponding Go types.
Changes:
- Add
deployedVersion,latestDeployment, andactiveDeploymentto thegetPackageGraphQL query and generated Go response types. - Extend
api.Packagewith deployment summary fields and post-decode normalization for null nested objects. - Update the
package getmarkdown template to display deployed version and deployment details.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/api/zz_generated.go | Updates genqlient-generated types/query to include deployed version + deployment summaries and introduces DeploymentAction. |
| pkg/api/schema.graphql | Formatting/cleanup changes in schema definitions (incl. enum value removal). |
| pkg/api/package.go | Adds PackageDeployment and new fields to Package, with decode cleanup for nil nested deployments. |
| pkg/api/genqlient.graphql | Extends getPackage query to request deployed version and deployment summaries. |
| cmd/templates/package.get.md.tmpl | Renders deployed version and latest/active deployment info in CLI output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
pkg/api/package.go
Outdated
Comment on lines
+63
to
+69
| // mapstructure creates empty structs for nil nested objects; nil them out | ||
| if pkg.LatestDeployment != nil && pkg.LatestDeployment.ID == "" { | ||
| pkg.LatestDeployment = nil | ||
| } | ||
| if pkg.ActiveDeployment != nil && pkg.ActiveDeployment.ID == "" { | ||
| pkg.ActiveDeployment = nil | ||
| } |
User prompts: - "This pr needs to have main pulled and then merged in, it refactored everything into an internal dir ... also, address the PR comments." - "push the pr and give me the link again" Changes: - Make DeployedVersion a *string to handle nullable GraphQL field - Add nil-out logic in toPackage for empty DeployedVersion pointer - Fix UTC timestamp formatting in template (call .UTC before .Format) - Add deref template function for *string rendering - Add genqlient @pointer directive for deployedVersion field - Add tests for nil and present deployment decode paths Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
latestDeployment,activeDeployment, anddeployedVersionfields to thegetPackageGraphQL queryPackageDeploymentstruct withid,status,action,version,createdAtTest plan
make checkpasses (all tests green, lint issues are pre-existing)mass pkg get <slug>against a package with deployments and verify outputmass pkg get <slug> -o jsonand verify new fields in JSON output🤖 Generated with Claude Code