Fix build download command required scopes
Description
Hello, as I was trying to download the logs from one of my pipeline build, I encountered the following error:
❯ bk build download --pipeline my_pipeline build_number
Error: missing required scopes: read_buildsread_artifactsread_build_logs
After checking my token scopes and digging around, I found that the "requiredScopes" annotation of the build download command was missing the , separator.
As the fix was straightforward (and successfully downloaded my logs with this fix), I did not open any issue. Let me know if you want me to add anything.
Thanks for the PR, @Inozuma! While it would fix this issue, I wonder should we implement a helper function to take in a list of scopes and return a string, given the solution in this PR would need iterating on if the permissions ever changed/increased.
Yes, indeed. What do you think of a new type type Scopes []Scope with a String method?
It could also be useful for additional methods when manipulating multiple Scope.
@Inozuma absolutely, sounds great. You're welcome to open a PR, or create a request via Issues.
@mcncl, I amended the commit to add the changes. Maybe you wanted a new PR for this ?
@Inozuma Thanks! I'll have a look at this in the morning and see if we can merge it in