@@ -21,11 +21,14 @@ with Github4s, you can interact with:
2121 - [ Edit a comment] ( #edit-a-comment )
2222 - [ Delete a comment] ( #delete-a-comment )
2323- [ Labels] ( #labels )
24+ - [ List labels for this repository] ( #list-labels-for-this-repository )
2425 - [ List labels] ( #list-labels )
2526 - [ Add labels] ( #add-labels )
2627 - [ Remove a label] ( #remove-a-label )
2728- [ Assignees] ( #assignees )
2829 - [ List available assignees] ( #list-available-assignees )
30+ - [ Milestones] ( #milestones )
31+ - [ List milestones for a respository] ( #list-milestones-for-a-repository )
2932
3033The following examples assume the following imports and token:
3134
@@ -268,6 +271,28 @@ See [the API doc](https://developer.github.com/v3/issues/comments/#delete-a-comm
268271
269272## Labels
270273
274+ ### List labels for this repository
275+
276+ You can list labels for an issue with the following parameters:
277+
278+ - the repository coordinates (` owner ` and ` name ` of the repository).
279+ - ` pagination ` : Limit and Offset for pagination, optional.
280+
281+ To list labels:
282+
283+ ``` scala mdoc:compile-only
284+ val labelListRepository = Github [IO ](accessToken).issues.listLabelsRepository(" 47deg" , " github4s" )
285+ labelListRepository.unsafeRunSync match {
286+ case Left (e) => println(s " Something went wrong: ${e.getMessage}" )
287+ case Right (r) => println(r.result)
288+ }
289+ ```
290+
291+ The ` result ` on the right is the corresponding [ List[ Label]] [ issue-scala ]
292+
293+ See [ the API doc] ( https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository ) for full reference.
294+
295+
271296### List labels
272297
273298You can list labels for an issue with the following parameters:
@@ -362,3 +387,33 @@ As a result, if you'd like to see a feature supported, feel free to create an is
362387
363388[ issue-scala ] : https://github.com/47deg/github4s/blob/master/github4s/src/main/scala/github4s/domain/Issue.scala
364389[ user-scala ] : https://github.com/47deg/github4s/blob/master/github4s/src/main/scala/github4s/domain/User.scala
390+
391+ ## Milestones
392+
393+ ### List milestones for a repository
394+
395+ You can list the milestone for a particular organization and repository with ` listMilestones ` ; it takes arguments:
396+
397+ - ` owner ` : name of the owner for which we want to retrieve the milestones.
398+ - ` repo ` : name of the repository for which we want to retrieve the milestones.
399+ - ` state ` : filter projects returned by their state. Can be either ` open ` , ` closed ` , ` all ` . Default: ` open ` , optional
400+ - ` sort ` : what to sort results by. Either ` due_on ` or ` completeness ` . Default: ` due_on ` , optional
401+ - ` direction ` the direction of the sort. Either ` asc ` or ` desc ` . Default: ` asc ` , optional
402+ - ` pagination ` : Limit and Offset for pagination, optional.
403+ - ` header ` : headers to include in the request, optional.
404+
405+ To list the milestone for owner ` 47deg ` and repository ` github4s ` :
406+
407+ ``` scala mdoc:compile-only
408+ val milestones = Github [IO ](accessToken).issues.listMilestones(" 47deg" , " github4s" , Some (" open" ), None , None )
409+ milestones.unsafeRunSync match {
410+ case Left (e) => println(s " Something went wrong: ${e.getMessage}" )
411+ case Right (r) => println(r.result)
412+ }
413+ ```
414+
415+ The ` result ` on the right is the corresponding [ List[ Milestone]] [ milestone-scala ]
416+
417+ See [ the API doc] ( https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository ) for full reference.
418+
419+ [ milestone-scala ] : https://github.com/47deg/github4s/blob/master/github4s/src/main/scala/github4s/domain/Milestone.scala
0 commit comments