Skip to content
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

add CRUD support for repo key-value pairs #896

Merged
merged 3 commits into from
Dec 5, 2022
Merged

add CRUD support for repo key-value pairs #896

merged 3 commits into from
Dec 5, 2022

Conversation

tbliu98
Copy link
Contributor

@tbliu98 tbliu98 commented Dec 2, 2022

This PR adds commands to src-cli to provide an alternative way for users to manage repo key-value pairs without having to interact directly with GraphQL.

  • Add field KeyValuePairs to the Repository type so it will be part of the response object for repo read requests
  • Add commands src repos add-kvp, src repos update-kvp, and src repos delete-kvp which correspond to the GraphQL endpoints addRepoKeyValuePair, updateRepoKeyValuePair, and deleteRepoKeyValuePair, respectively
    • These commands will exit with an error if all required flags are not provided

Test plan

Manually tested against local dev instance

- Add field KeyValuePairs to the Repository type so it will be part of the response object for repo read requests
- Add commands `src repos add-kvp`, `src repos update-kvp`, and `src repos delete-kvp`
@tbliu98 tbliu98 changed the title repos: add CRUD support for repo key-value pairs add CRUD support for repo key-value pairs Dec 2, 2022
@tbliu98 tbliu98 marked this pull request as ready for review December 2, 2022 16:35
Copy link
Member

@camdencheek camdencheek left a comment

Choose a reason for hiding this comment

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

Nice! This will definitely make this feature a bit more accessible

cmd/src/repos_add_kvp.go Show resolved Hide resolved
cmd/src/repos_add_kvp.go Show resolved Hide resolved
cmd/src/repos_add_kvp.go Show resolved Hide resolved
cmd/src/repos_add_kvp.go Show resolved Hide resolved
@tbliu98 tbliu98 merged commit ba6d0bf into main Dec 5, 2022
@tbliu98 tbliu98 deleted the tl/repo-kvps branch December 5, 2022 23:06
scjohns pushed a commit that referenced this pull request Apr 24, 2023
* add CRUD support for repo key-value pairs
- Add field KeyValuePairs to the Repository type so it will be part of the response object for repo read requests
- Add commands `src repos add-kvp`, `src repos update-kvp`, and `src repos delete-kvp`

* go imports

* rename added files for consistency
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