how to add AddCollaborator by email address?
I'm looking for a way to add collaborators by email address.
I checked AddCollaborator only support username,
opt := &github.RepositoryAddCollaboratorOptions{Permission: "push"}
collaboratorInvitation, _, err := client.Repositories.AddCollaborator(ctx, orgName, name, "GITHUB_USERNAME", opt)
is there any method to get username by email address or add AddCollaborator by email addrress?
Thanks,
is there any method to get username by email address or add AddCollaborator by email addrress?
Going back to the official GitHub v3 API documentation: https://docs.github.com/en/rest/reference/collaborators#add-a-repository-collaborator and searching for "email", it looks like this is not possible via the API, and therefore this repo (which is just a Go client for the API) will not be able to do that. Sorry.
thank you @gmlewis ! it's for adding collaborator,
is there any other api to get username based on the useremail?
Not that I know of. You probably will want to contact GitHub Tech Support to get an answer to this question. Feel free to report back here what you find out from them.