Skip to content

Commit e76e7a3

Browse files
committed
Add link to API description; expose addCollaboratorR
1 parent 9f22966 commit e76e7a3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/GitHub.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ module GitHub (
252252
-- | See <https://developer.github.com/v3/repos/collaborators/>
253253
collaboratorsOnR,
254254
isCollaboratorOnR,
255+
addCollaboratorR,
255256

256257
-- ** Comments
257258
-- | See <https://developer.github.com/v3/repos/comments/>

src/GitHub/Endpoints/Repos/Collaborators.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ module GitHub.Endpoints.Repos.Collaborators (
1616
module GitHub.Data,
1717
) where
1818

19-
import GitHub.Data
20-
import GitHub.Internal.Prelude
21-
import GitHub.Request
22-
import Prelude ()
19+
import GitHub.Data
20+
import GitHub.Internal.Prelude
21+
import GitHub.Request
22+
import Prelude ()
2323

2424
-- | All the users who have collaborated on a repo.
2525
--
@@ -72,11 +72,12 @@ addCollaborator
7272
addCollaborator auth owner repo coll =
7373
executeRequest auth $ addCollaboratorR owner repo coll
7474

75+
-- | Invite a user as a collaborator.
76+
-- See <https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator>
7577
addCollaboratorR
7678
:: Name Owner -- ^ Repository owner
7779
-> Name Repo -- ^ Repository name
7880
-> Name User -- ^ Collaborator to add
7981
-> Request 'RW ()
8082
addCollaboratorR owner repo coll =
8183
command Put' ["repos", toPathPart owner, toPathPart repo, "collaborators", toPathPart coll] mempty
82-
-- /repos/:owner/:repo/collaborators/:username

0 commit comments

Comments
 (0)