9 Commits

Author SHA1 Message Date
Ariel Deitcher
d88f49218f update go-gh to latest version (#74)
Some checks failed
ci-workflow / build (macos-latest) (push) Has been cancelled
ci-workflow / build (ubuntu-latest) (push) Has been cancelled
ci-workflow / build (windows-latest) (push) Has been cancelled
release / release (push) Has been cancelled
2023-06-28 16:44:51 -04:00
dependabot[bot]
27d4a4c8f5 Bump golang.org/x/net from 0.0.0-20211112202133-69e39bad7dc2 to 0.7.0 (#58)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20211112202133-69e39bad7dc2 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-11 22:19:34 +05:30
Deepak Dahiya
b8890ddb4c Used go-gh table printer for listing caches (#25)
* Used go-gh table printer for listing caches

* lint

* lint

* minor

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup
2022-08-11 14:15:02 +05:30
Sankalp Kotewar
790f19d8a6 Added test cases for Delete (#8)
* Completed List cmd and added API calls

* Minor comments and add delete code to pass linting

* Typo in descriptions

* Minor comments

* Validations

* Validations-1

* improved branch flag validation

* removed build

* working after refactory with bad names

* Command working, test not working

* Corrected creation of service

* Finalized structure using service

* Deleted tests

* cleanup

* cleanup

* cleanup

* removed space with tab

* aligned types in model.go

* Update model.go

* resolved comments

* Refactor

* removed long descriptions

* Working incomplete tests

* Completed tests

* cleanup

* checks

* PR comments

* PR comments

* minor comment issue

* minor comment issue

* Added test cases for Delete

* updated tests to work with workflow

* Added missing error condition

* Updated tests to support new option service

* Improved eror handling for list

* Fixed test case

* Improved error handling

* Error handling and test cases for delete API calls

* Added test case for user confirmation delete.

* Removed unused import from test

* Fixed test case for error scenario

* Upgraded go-gh

* reusing rest client error

* Fix for failing windows test cases

* help cmd removed when cache isnt present on delete

* Pretty print ratio and space between cols modified

* Error handling wrapping

* Reverted back error message after silencing help

Co-authored-by: t-dedah <t-dedah@github.com>
Co-authored-by: Deepak Dahiya <59823596+t-dedah@users.noreply.github.com>
2022-07-14 02:33:36 +05:30
Deepak Dahiya
db34270ecb Tests for CLI (#6)
* Completed List cmd and added API calls

* Minor comments and add delete code to pass linting

* Typo in descriptions

* Minor comments

* Validations

* Validations-1

* improved branch flag validation

* removed build

* working after refactory with bad names

* Command working, test not working

* Corrected creation of service

* Finalized structure using service

* Deleted tests

* cleanup

* cleanup

* cleanup

* removed space with tab

* aligned types in model.go

* Update model.go

* resolved comments

* Refactor

* removed long descriptions

* Working incomplete tests

* Completed tests

* cleanup

* checks

* PR comments

* PR comments

* minor comment issue

* minor comment issue

* updated tests to work with workflow

* Updated tests to support new option service

* Improved eror handling for list

* Improved error handling

* Upgraded go-gh

* reusing rest client error
2022-07-14 02:14:03 +05:30
Sankalp Kotewar
c98ebfe90b E2E delete command using list API (#4)
* Completed List cmd and added API calls

* Minor comments and add delete code to pass linting

* Typo in descriptions

* Added delete functionality using existing list API

* Updated limit param for list api to default 30

* Minor refactoring

* Linting fixes for survey output

* Implemented review comments

* Handling 404 response when confirm flag is passed

* Added COMMAND back to delete CLI

* Minor comments

* Check http err statuscode for 404

* Validations

* Validations-1

* improved branch flag validation

* removed build

* String match made case insensitive

* Added TODO for error handling

* Updated error message when args are not provided

* Worked on review comments

* Argument length check updated

* Separated direct and indirect dependencies

* Used SPrintF for formatting strings

* Updated lastAccessed time logic

* Removed extra variable userConfirmation

* Removed unnecessary computations

* Printing and formatting changes

* Passed key from input in queryparams

* Scan List API iteratively to get exact matches

* Added pretty print for trimmed list

* Update page number instead of re-generating params

* Added listAllCaches method and moved it to utils

* Moved redTick to utils

* Update internal/utils.go

Co-authored-by: Bishal Prasad <bishal-pdmsft@github.com>

* Limited scope of `sb` to `if` block

* Fixed pretty print issue

* Error type checked for httpError

* Added PrintOneOrMore fn, moved listAll to service

* Implemented `Goment` for last accessed time

* Used percentage based on window size for printing

* Removed stringbuilder and updated fn name

* Made `ListAllCaches` member of `actions_cache.go`

* Updated prettyPrint logic cover better content

* Using PrettyPrint for List command as well.

* Separated direct and indirect modules

Co-authored-by: t-dedah <t-dedah@github.com>
Co-authored-by: Deepak Dahiya <59823596+t-dedah@users.noreply.github.com>
Co-authored-by: Bishal Prasad <bishal-pdmsft@github.com>
2022-06-28 14:40:11 +05:30
Deepak Dahiya
9e752991d6 Refactorization (#5)
* Completed List cmd and added API calls

* Minor comments and add delete code to pass linting

* Typo in descriptions

* Minor comments

* Validations

* Validations-1

* improved branch flag validation

* removed build

* working after refactory with bad names

* Command working, test not working

* Corrected creation of service

* Finalized structure using service

* Deleted tests

* cleanup

* cleanup

* cleanup

* removed space with tab

* aligned types in model.go

* Update model.go

* resolved comments

* Refactor

* removed long descriptions

* Added page
2022-06-24 16:08:15 +05:30
t-dedah
d11a35a605 desc corrections 2022-06-13 11:40:06 +05:30
t-dedah
e8ea897520 Created extension 2022-06-10 15:01:35 +05:30