Fix build after grants and config-profile merge - #254
Merged
Conversation
ChristensenJoe
approved these changes
Sep 12, 2026
Member
Author
|
@claude review |
|
Claude finished @chrisghill's task in 59s —— View job Review complete
Summary: This is a clean, minimal fix that does exactly what the description says.
No bugs, correctness issues, or style concerns found. I was not able to run This looks good to merge as-is. |
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.
#252 (config profiles) and #253 (repo/resource grants) merged cleanly as text but not as code. #252 introduced
newMassdriverClient(cmd)incmd/client.go, which resolves the--profileflag, and converted every call site in the files it touched. The grant commands landed afterward still callingmassdriver.NewClient()directly.Why only one file failed the build
cmd/resource.gono longer importsmassdriver— #252 removed it once its own call sites were converted — so the three grant calls failed withundefined: massdriver.cmd/repository.gokept the import, becausecreateOciRepoCommonuses*massdriver.Clientas a parameter type. It compiled, and its three grant commands silently ignored--profile. That one would have shipped unnoticed.Changes
newMassdriverClient(cmd).runRepositoryGrantCreateandrunResourceGrantCreatetakecmd *cobra.Commandas their first parameter, matching how Addmass configfor managing CLI profiles (SDK v0.3.3) #252 threaded it intorunRepositoryList. The list and delete runners already had it.docs/generated/mass_*_grant*.mdpages. They were produced before--profileexisted and were missing its "Options inherited from parent commands" section.Verification
make checkpasses. Confirmed the flag is wired rather than merely compiling —mass repository grant create <name> --all-projects --profile no-such-profilenow fails withprofile not found, where before it accepted and ignored the flag. Exercised create, list, and delete against a live organization on a throwaway repository, then removed it.Not included
cmd/config.gocarries seven inline cobraExamplefields. #252 predates the sweep in #253 that moved all other examples intodocs/helpdocs, so the convention is inconsistent again. Converting them means authoring seven new helpdocs, which belongs in its own PR.