gh-repo-collab icon indicating copy to clipboard operation
gh-repo-collab copied to clipboard

repo-collab add from users-file doesn't work as expected

Open joshuasimon-taulia opened this issue 2 years ago • 1 comments

Given the example in the help text, I would expect this to successfully copy the permissions from one github repo to another

gh repo-collab list my-org/kafka-chart > /tmp/collab.txt
gh repo-collab add my-org/app-jwt < /tmp/collab.txt
gh: Not Found (HTTP 404)

i think part of this is because the output of list doesn't prefix team names with the github organization. ex:

grep '/' /tmp/collab.txt
/architects               maintain
/developers               triage
/operations               maintain

and this while loop needs to capture the second field as permissions or something like that

joshuasimon-taulia avatar Feb 14 '23 23:02 joshuasimon-taulia

Hi, this isn't well documented, but when reading from a file, each line is expected only to have a single user name (or team name), with the permission defined by the --permission flag and not from the file.

In other words, you can't export list output and import it unchanged into add. But, that sounds like a good feature request!

mislav avatar Feb 15 '23 14:02 mislav