-
Notifications
You must be signed in to change notification settings - Fork 194
Invitation endpoint #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invitation endpoint #360
Conversation
@@ -78,6 +78,6 @@ addCollaboratorR | |||
:: Name Owner -- ^ Repository owner | |||
-> Name Repo -- ^ Repository name | |||
-> Name User -- ^ Collaborator to add | |||
-> GenRequest 'MtUnit 'RW () | |||
-> GenRequest 'MtJSON 'RW RepoInvitation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will fail when https://developer.github.com/v3/repos/collaborators/#response-when-person-is-already-a-collaborator
is there value in returning invitation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there value in returning invitation?
I think so. We wrote a tool to automate some Github work for our project, and a part of it was inviting some users to a repo and then send the invitation id to the user for them to accept.
For automated work, the information returned from API calls can be valuable, as it saves a subsequent API call.
It's true that it will fail when user is a collaborator. Perhaps it should be a Maybe RepoInvitation
?
Squashed in #374 |
RepoInvitation
(some of the collaborator endpoints don't have to ignore the JSON returned by Github anymore)