feat(securefile): Ability to Update existing files
Description
Adds the ability to update existing securefiles, removing the need to run numerous commands to get to the same outcome, significantly improving the UX of securefiles when using the CLI
Old way: glab securefile list -> Get ID -> glab securefile remove <id> -> glab securefile create <name> <path>
New way: glab securefile update <name> <path>
Related Issues
Resolves #8381 (closed)
Relates to #8380 (closed) (reuse a helper and extends to avoid code duplication)
How has this been tested?
- Added unit-tests
- Tested locally by running
glab securefile create jack-test file.txt -R <repo>glab securefile list -R <repo>- To get the checksum- Made an edit to the contents of the file i had locally, then ran
glab securefile update jack-test file.txt -R <repo>(prompted for confirmation) glab securefile list -R <repo>- Validate checksum has changed (it did)