Closed
Conversation
phadej
suggested changes
Apr 26, 2019
| -> Name Repo -- ^ Repository name | ||
| -> Name User -- ^ Collaborator to add | ||
| -> GenRequest 'MtUnit 'RW () | ||
| -> GenRequest 'MtJSON 'RW RepoInvitation |
Contributor
There was a problem hiding this comment.
this will fail when https://developer.github.com/v3/repos/collaborators/#response-when-person-is-already-a-collaborator
is there value in returning invitation?
Contributor
Author
There was a problem hiding this comment.
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?
Contributor
|
Squashed in #374 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RepoInvitation(some of the collaborator endpoints don't have to ignore the JSON returned by Github anymore)