-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(feat) add "src repos {add|update|delete}-metadata -repo-name" flag support #977
(feat) add "src repos {add|update|delete}-metadata -repo-name" flag support #977
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
The other commands seem to follow a different naming scheme, usually |
Is that not what this PR does? I'm reading a command like |
Kinda, I thought that |
Thanks for the feedback, @eseliger. TBH I haven't thought For the scope of this PR, I would like to keep this as is, as changing will require more effort and refactoring to make it work both the new way and the old way for backward compat purposes. |
That's okay 👍 |
Part of https://github.com/sourcegraph/pr-faqs/issues/96.
This PR adds
src repos {add|update|delete}-metadata -repo-name
flag supportNOTE: When using
repo-name
flag, it makes an extra GQL query to get a repo ID. This is made for back compat purposes instead of introducing breaking change and updating underlying add/update/delete repo metadata GQL query.Test plan
repo
flag as previouslygo run ./cmd/src repos add-metadata -repo=$repoID -key=test
go run ./cmd/src repos update-metadata -repo=$repoID -key=test -value=value
go run ./cmd/src repos delete-metadata -repo=$repoID -key=test
repo-name
flag as previouslygo run ./cmd/src repos add-metadata -repo-name=$repoName -key=test
go run ./cmd/src repos update-metadata -repo-name=$repoName -key=test -value=value
go run ./cmd/src repos delete-metadata -repo-name=$repoName -key=test