feat(securefile): remove by name

Description

Implement ability to remove a securefile by --name rather than having to get the ID and then manually pass to remove, significantly improving UX

  • Establish helper for getting securefile id by name
  • extend securefile remove to work with --name
  • Use helper in download

I have debated added a call to getName based on ID to make the output slightly more "human readable" so it states deleting file <name> instead of deleting file <id> which might be harder to grasp what that id "is"

Resolves #8380 (closed)

How has this been tested?

Ran the CLI locally having used ./bin/glab securefile create followed by multiple calls to ./bin/glab securefile remove :

  • with --name
  • with --name non existent (expected error)
  • with --id and id having re-created and passing list through jq to get the id

Also extended and implemented additional unit tests

Screenshots (if appropriate):

Edited by Jack

Merge request reports

Loading