I am using gh-cli
I want to add outside collaborator to private repository (my-repo-in-org) in my organization(my-org)
I can display collaborators using this gh
gh api repos/my-org/myrepo-in-org/collaborators
Based on docs Add a repository collaborator
I tried to add collaborator (collaborator_name) with push permission using:
gh api repos/my-org/my-repo-in-org/collaborators/collaborator-name -f '{"permission"="push"}'
But getting:
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest"
}
gh: Not Found (HTTP 404)
Any clue how can I do it?
I need to manage multiple repositories with multiple users and want to automate it.