diff --git a/docs/docs/issue.md b/docs/docs/issue.md index 9a8a6d7a9..8b07554e4 100644 --- a/docs/docs/issue.md +++ b/docs/docs/issue.md @@ -340,7 +340,6 @@ You can add existing labels to an issue with the following parameters: - the repository coordinates (`owner` and `name` of the repository). - `number`: The issue number. - `labels`: The existing labels that require adding. - - `pagination`: Limit and Offset for pagination, optional. To add existing labels to an issue: diff --git a/github4s/src/main/scala/github4s/algebras/Issues.scala b/github4s/src/main/scala/github4s/algebras/Issues.scala index 1d8767e4f..6a10c5d37 100644 --- a/github4s/src/main/scala/github4s/algebras/Issues.scala +++ b/github4s/src/main/scala/github4s/algebras/Issues.scala @@ -255,7 +255,6 @@ trait Issues[F[_]] { * @param repo name of the repo * @param number Issue number * @param labels the list of labels to add to the issue - * @param pagination Limit and Offset for pagination, optional. * @param headers optional user headers to include in the request * @return a GHResponse with the list of labels added to the Issue. */ @@ -264,7 +263,6 @@ trait Issues[F[_]] { repo: String, number: Int, labels: List[String], - pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[List[Label]]] @@ -283,7 +281,6 @@ trait Issues[F[_]] { repo: String, number: Int, label: String, - pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[List[Label]]] diff --git a/github4s/src/main/scala/github4s/interpreters/GitDataInterpreter.scala b/github4s/src/main/scala/github4s/interpreters/GitDataInterpreter.scala index d1fd58cdc..5514d530d 100644 --- a/github4s/src/main/scala/github4s/interpreters/GitDataInterpreter.scala +++ b/github4s/src/main/scala/github4s/interpreters/GitDataInterpreter.scala @@ -33,7 +33,12 @@ class GitDataInterpreter[F[_]](implicit client: HttpClient[F], accessToken: Opti pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[NonEmptyList[Ref]]] = - client.get[NonEmptyList[Ref]](accessToken, s"repos/$owner/$repo/git/refs/$ref", headers) + client.get[NonEmptyList[Ref]]( + accessToken, + s"repos/$owner/$repo/git/refs/$ref", + headers, + pagination = pagination + ) override def createReference( owner: String, diff --git a/github4s/src/main/scala/github4s/interpreters/IssuesInterpreter.scala b/github4s/src/main/scala/github4s/interpreters/IssuesInterpreter.scala index 1337e6913..558573b01 100644 --- a/github4s/src/main/scala/github4s/interpreters/IssuesInterpreter.scala +++ b/github4s/src/main/scala/github4s/interpreters/IssuesInterpreter.scala @@ -35,7 +35,8 @@ class IssuesInterpreter[F[_]](implicit client: HttpClient[F], accessToken: Optio pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[List[Issue]]] = - client.get[List[Issue]](accessToken, s"repos/$owner/$repo/issues", headers) + client + .get[List[Issue]](accessToken, s"repos/$owner/$repo/issues", headers, pagination = pagination) override def getIssue( owner: String, @@ -101,7 +102,12 @@ class IssuesInterpreter[F[_]](implicit client: HttpClient[F], accessToken: Optio headers: Map[String, String] = Map() ): F[GHResponse[List[Comment]]] = client - .get[List[Comment]](accessToken, s"repos/$owner/$repo/issues/$number/comments", headers) + .get[List[Comment]]( + accessToken, + s"repos/$owner/$repo/issues/$number/comments", + headers, + pagination = pagination + ) override def createComment( owner: String, @@ -160,14 +166,18 @@ class IssuesInterpreter[F[_]](implicit client: HttpClient[F], accessToken: Optio pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[List[Label]]] = - client.get[List[Label]](accessToken, s"repos/$owner/$repo/issues/$number/labels", headers) + client.get[List[Label]]( + accessToken, + s"repos/$owner/$repo/issues/$number/labels", + headers, + pagination = pagination + ) override def addLabels( owner: String, repo: String, number: Int, labels: List[String], - pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[List[Label]]] = client.post[List[String], List[Label]]( @@ -182,7 +192,6 @@ class IssuesInterpreter[F[_]](implicit client: HttpClient[F], accessToken: Optio repo: String, number: Int, label: String, - pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[List[Label]]] = client.deleteWithResponse[List[Label]]( diff --git a/github4s/src/main/scala/github4s/interpreters/RepositoriesInterpreter.scala b/github4s/src/main/scala/github4s/interpreters/RepositoriesInterpreter.scala index 2f0ca27a5..d957988cb 100644 --- a/github4s/src/main/scala/github4s/interpreters/RepositoriesInterpreter.scala +++ b/github4s/src/main/scala/github4s/interpreters/RepositoriesInterpreter.scala @@ -74,7 +74,8 @@ class RepositoriesInterpreter[F[_]](implicit client: HttpClient[F], accessToken: accessToken, s"repos/$owner/$repo/contents/$path", headers, - ref.fold(Map.empty[String, String])(r => Map("ref" -> r)) + ref.fold(Map.empty[String, String])(r => Map("ref" -> r)), + pagination ) override def createFile( @@ -174,7 +175,8 @@ class RepositoriesInterpreter[F[_]](implicit client: HttpClient[F], accessToken: "protected" -> onlyProtected.map(_.toString) ).collect { case (key, Some(value)) => key -> value - } + }, + pagination ) override def listContributors( @@ -192,7 +194,8 @@ class RepositoriesInterpreter[F[_]](implicit client: HttpClient[F], accessToken: "anon" -> anon ).collect { case (key, Some(value)) => key -> value - } + }, + pagination ) override def listCollaborators( @@ -210,7 +213,8 @@ class RepositoriesInterpreter[F[_]](implicit client: HttpClient[F], accessToken: "affiliation" -> affiliation ).collect { case (key, Some(value)) => key -> value - } + }, + pagination ) override def createRelease( @@ -246,7 +250,12 @@ class RepositoriesInterpreter[F[_]](implicit client: HttpClient[F], accessToken: pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[List[Status]]] = - client.get[List[Status]](accessToken, s"repos/$owner/$repo/commits/$ref/statuses", headers) + client.get[List[Status]]( + accessToken, + s"repos/$owner/$repo/commits/$ref/statuses", + headers, + pagination = pagination + ) override def createStatus( owner: String, diff --git a/github4s/src/main/scala/github4s/interpreters/UsersInterpreter.scala b/github4s/src/main/scala/github4s/interpreters/UsersInterpreter.scala index 3d37a1d41..5623f4d2e 100644 --- a/github4s/src/main/scala/github4s/interpreters/UsersInterpreter.scala +++ b/github4s/src/main/scala/github4s/interpreters/UsersInterpreter.scala @@ -44,5 +44,6 @@ class UsersInterpreter[F[_]](implicit client: HttpClient[F], accessToken: Option pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[List[User]]] = - client.get[List[User]](accessToken, s"users/$username/following", headers) + client + .get[List[User]](accessToken, s"users/$username/following", headers, pagination = pagination) } diff --git a/github4s/src/test/scala/github4s/integration/IssuesSpec.scala b/github4s/src/test/scala/github4s/integration/IssuesSpec.scala index ea057bb32..776494efc 100644 --- a/github4s/src/test/scala/github4s/integration/IssuesSpec.scala +++ b/github4s/src/test/scala/github4s/integration/IssuesSpec.scala @@ -161,7 +161,6 @@ trait IssuesSpec extends BaseIntegrationSpec { validRepoName, validIssueNumber, validIssueLabel.head, - None, headerUserAgent ) } @@ -180,7 +179,6 @@ trait IssuesSpec extends BaseIntegrationSpec { validRepoName, validIssueNumber, validIssueLabel, - None, headerUserAgent ) } diff --git a/github4s/src/test/scala/github4s/unit/IssuesSpec.scala b/github4s/src/test/scala/github4s/unit/IssuesSpec.scala index fca12cb71..cdb62f5b0 100644 --- a/github4s/src/test/scala/github4s/unit/IssuesSpec.scala +++ b/github4s/src/test/scala/github4s/unit/IssuesSpec.scala @@ -252,7 +252,6 @@ class IssuesSpec extends BaseSpec { validRepoName, validIssueNumber, validIssueLabel, - None, headerUserAgent ) } @@ -273,7 +272,6 @@ class IssuesSpec extends BaseSpec { validRepoName, validIssueNumber, validIssueLabel.head, - None, headerUserAgent ) }