From 1eea002b6524e47650ab509790dd5e518395342d Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Jun 2021 14:32:03 +0100 Subject: [PATCH 1/4] added watched repos to Activity algebra --- .../src/main/scala/github4s/Decoders.scala | 12 ++++++++++++ .../scala/github4s/algebras/Activities.scala | 14 ++++++++++++++ .../main/scala/github4s/domain/Activity.scala | 4 ++++ .../interpreters/ActivitiesInterpreter.scala | 11 +++++++++++ .../github4s/integration/ActivitiesSpec.scala | 19 +++++++++++++++++++ .../scala/github4s/unit/ActivitiesSpec.scala | 15 +++++++++++++++ .../scala/github4s/unit/DecodersSpec.scala | 8 ++++++++ .../scala/github4s/utils/FakeResponses.scala | 7 +++++++ .../test/scala/github4s/utils/TestData.scala | 3 ++- 9 files changed, 92 insertions(+), 1 deletion(-) diff --git a/github4s/src/main/scala/github4s/Decoders.scala b/github4s/src/main/scala/github4s/Decoders.scala index ccfa5c505..4ca82189e 100644 --- a/github4s/src/main/scala/github4s/Decoders.scala +++ b/github4s/src/main/scala/github4s/Decoders.scala @@ -242,6 +242,18 @@ object Decoders { ) ) + + implicit val decodeWatchedRepository: Decoder[WatchedRepository] = + Decoder[Repository] + .map(WatchedRepository(_)) + .or( + Decoder.instance(c => + for { + repo <- c.downField("repo").as[Repository] + } yield WatchedRepository(repo)) + ) + + implicit def decodeNonEmptyList[T](implicit D: Decoder[T]): Decoder[NonEmptyList[T]] = { def decodeCursors(cursors: List[HCursor]): Result[NonEmptyList[T]] = diff --git a/github4s/src/main/scala/github4s/algebras/Activities.scala b/github4s/src/main/scala/github4s/algebras/Activities.scala index b9cd3c60a..7814154b8 100644 --- a/github4s/src/main/scala/github4s/algebras/Activities.scala +++ b/github4s/src/main/scala/github4s/algebras/Activities.scala @@ -76,4 +76,18 @@ trait Activities[F[_]] { headers: Map[String, String] = Map() ): F[GHResponse[List[StarredRepository]]] + /** + * List the respositories watched by a particular user + * + * @param username User for which we want to retrieve the starred repositories + * @param pagination Limit and Offset for pagination + * @param headers Optional user headers to include in the request + * @return GHResponse with the list of starred repositories for this user + */ + def listWatchedRespositories( + username: String, + pagination: Option[Pagination], + headers: Map[String, String] = Map() + ): F[GHResponse[List[WatchedRepository]]] + } diff --git a/github4s/src/main/scala/github4s/domain/Activity.scala b/github4s/src/main/scala/github4s/domain/Activity.scala index 51023c40b..e46e51eb5 100644 --- a/github4s/src/main/scala/github4s/domain/Activity.scala +++ b/github4s/src/main/scala/github4s/domain/Activity.scala @@ -39,3 +39,7 @@ final case class StarredRepository( repo: Repository, starred_at: Option[String] = None ) + +final case class WatchedRepository( + repo: Repository +) diff --git a/github4s/src/main/scala/github4s/interpreters/ActivitiesInterpreter.scala b/github4s/src/main/scala/github4s/interpreters/ActivitiesInterpreter.scala index f8a2dbc3c..58c800b90 100644 --- a/github4s/src/main/scala/github4s/interpreters/ActivitiesInterpreter.scala +++ b/github4s/src/main/scala/github4s/interpreters/ActivitiesInterpreter.scala @@ -69,4 +69,15 @@ class ActivitiesInterpreter[F[_]](implicit client: HttpClient[F]) extends Activi ).collect { case (key, Some(value)) => key -> value }, pagination = pagination ) + + override def listWatchedRespositories( + username: String, + pagination: Option[Pagination], + headers: Map[String, String] + ): F[GHResponse[List[WatchedRepository]]] = + client.get[List[WatchedRepository]]( + s"users/$username/subscriptions", + headers = headers, + pagination = pagination + ) } diff --git a/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala b/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala index 33c8e1bb7..0084ad4cb 100644 --- a/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala +++ b/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala @@ -143,4 +143,23 @@ trait ActivitiesSpec extends BaseIntegrationSpec { testIsLeft[NotFoundError, List[StarredRepository]](response) response.statusCode shouldBe notFoundStatusCode } + + + "Activity >> ListWatchedRepositories" should "return the expected list of watched repos" taggedAs Integration in { + val response = clientResource + .use { client => + Github[IO](client, accessToken).activities + .listWatchedRespositories(validUsername, None, headers = headerUserAgent) + } + .unsafeRunSync() + + testIsRight[List[WatchedRepository]]( + response, + { r => + r.nonEmpty shouldBe true + } + ) + response.statusCode shouldBe okStatusCode + } + } diff --git a/github4s/src/test/scala/github4s/unit/ActivitiesSpec.scala b/github4s/src/test/scala/github4s/unit/ActivitiesSpec.scala index 0eb30d714..0e768e03d 100644 --- a/github4s/src/test/scala/github4s/unit/ActivitiesSpec.scala +++ b/github4s/src/test/scala/github4s/unit/ActivitiesSpec.scala @@ -73,4 +73,19 @@ class ActivitiesSpec extends BaseSpec { activities.listStarredRepositories(validUsername, false, None, None, None, headerUserAgent) } + "Activity.listWatchedRespositories" should "call httpClient.get with the right parameters" in { + + val response: IO[GHResponse[List[WatchedRepository]]] = + IO(GHResponse(List(watchedRepository).asRight, okStatusCode, Map.empty)) + + implicit val httpClientMock = httpClientMockGet[List[WatchedRepository]]( + url = s"users/$validUsername/subscriptions", + response = response + ) + + val activities = new ActivitiesInterpreter[IO] + + activities.listWatchedRespositories(validUsername, None, headerUserAgent) + } + } diff --git a/github4s/src/test/scala/github4s/unit/DecodersSpec.scala b/github4s/src/test/scala/github4s/unit/DecodersSpec.scala index 1af003ea9..38d3a99b1 100644 --- a/github4s/src/test/scala/github4s/unit/DecodersSpec.scala +++ b/github4s/src/test/scala/github4s/unit/DecodersSpec.scala @@ -67,6 +67,14 @@ class DecodersSpec extends AnyFlatSpec with Matchers with FakeResponses { decode[StarredRepository](getStarredRepoValidResponse).isRight shouldBe true } + "WatchedRepository decoder" should "return a watched repository if given a repo" in { + decode[WatchedRepository](getRepoResponse).isRight shouldBe true + } + + it should "return a watched repository if given a watched repository" in { + decode[WatchedRepository](getStarredRepoValidResponse).isRight shouldBe true + } + "NonEmptyList Decoder" should "return a valid NonEmptyList for a valid JSON list" in { decode[NonEmptyList[Int]]("[1,2,3]") shouldBe Right(NonEmptyList.of(1, 2, 3)) } diff --git a/github4s/src/test/scala/github4s/utils/FakeResponses.scala b/github4s/src/test/scala/github4s/utils/FakeResponses.scala index 2de071b7b..6f245695b 100644 --- a/github4s/src/test/scala/github4s/utils/FakeResponses.scala +++ b/github4s/src/test/scala/github4s/utils/FakeResponses.scala @@ -515,6 +515,13 @@ trait FakeResponses { |} """.stripMargin + val getWatchedRepoValidResponse = + s""" + |{ + | "repo": $getRepoResponse + |} + """.stripMargin + val getUserRepoPermissionResponse = s""" |{ diff --git a/github4s/src/test/scala/github4s/utils/TestData.scala b/github4s/src/test/scala/github4s/utils/TestData.scala index d26ac84b0..f27cb14e4 100644 --- a/github4s/src/test/scala/github4s/utils/TestData.scala +++ b/github4s/src/test/scala/github4s/utils/TestData.scala @@ -19,7 +19,7 @@ package github4s.utils import java.util.UUID import com.github.marklister.base64.Base64._ -import github4s.domain.{Stargazer, StarredRepository, Subscription, _} +import github4s.domain.{Stargazer, StarredRepository, Subscription, WatchedRepository, _} trait TestData { @@ -434,6 +434,7 @@ trait TestData { val stargazer = Stargazer(user) val starredRepository = StarredRepository(repo) + val watchedRepository = WatchedRepository(repo) val pullRequestReview = PullRequestReview( id = validPullRequestReviewNumber, From f6b17102a430c8fc8f6f89e26d256aeb358c3b18 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Jun 2021 14:41:24 +0100 Subject: [PATCH 2/4] fmt check --- github4s/src/main/scala/github4s/Decoders.scala | 7 +++---- .../src/main/scala/github4s/algebras/Activities.scala | 6 +++--- github4s/src/main/scala/github4s/domain/Activity.scala | 2 +- .../github4s/interpreters/ActivitiesInterpreter.scala | 8 ++++---- .../test/scala/github4s/integration/ActivitiesSpec.scala | 7 ++----- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/github4s/src/main/scala/github4s/Decoders.scala b/github4s/src/main/scala/github4s/Decoders.scala index 4ca82189e..f348f9604 100644 --- a/github4s/src/main/scala/github4s/Decoders.scala +++ b/github4s/src/main/scala/github4s/Decoders.scala @@ -242,17 +242,16 @@ object Decoders { ) ) - implicit val decodeWatchedRepository: Decoder[WatchedRepository] = Decoder[Repository] .map(WatchedRepository(_)) .or( Decoder.instance(c => for { - repo <- c.downField("repo").as[Repository] - } yield WatchedRepository(repo)) + repo <- c.downField("repo").as[Repository] + } yield WatchedRepository(repo) ) - + ) implicit def decodeNonEmptyList[T](implicit D: Decoder[T]): Decoder[NonEmptyList[T]] = { diff --git a/github4s/src/main/scala/github4s/algebras/Activities.scala b/github4s/src/main/scala/github4s/algebras/Activities.scala index 7814154b8..cd658e4f5 100644 --- a/github4s/src/main/scala/github4s/algebras/Activities.scala +++ b/github4s/src/main/scala/github4s/algebras/Activities.scala @@ -85,9 +85,9 @@ trait Activities[F[_]] { * @return GHResponse with the list of starred repositories for this user */ def listWatchedRespositories( - username: String, - pagination: Option[Pagination], - headers: Map[String, String] = Map() + username: String, + pagination: Option[Pagination], + headers: Map[String, String] = Map() ): F[GHResponse[List[WatchedRepository]]] } diff --git a/github4s/src/main/scala/github4s/domain/Activity.scala b/github4s/src/main/scala/github4s/domain/Activity.scala index e46e51eb5..9bda86eb2 100644 --- a/github4s/src/main/scala/github4s/domain/Activity.scala +++ b/github4s/src/main/scala/github4s/domain/Activity.scala @@ -41,5 +41,5 @@ final case class StarredRepository( ) final case class WatchedRepository( - repo: Repository + repo: Repository ) diff --git a/github4s/src/main/scala/github4s/interpreters/ActivitiesInterpreter.scala b/github4s/src/main/scala/github4s/interpreters/ActivitiesInterpreter.scala index 58c800b90..7a14ee5b1 100644 --- a/github4s/src/main/scala/github4s/interpreters/ActivitiesInterpreter.scala +++ b/github4s/src/main/scala/github4s/interpreters/ActivitiesInterpreter.scala @@ -71,10 +71,10 @@ class ActivitiesInterpreter[F[_]](implicit client: HttpClient[F]) extends Activi ) override def listWatchedRespositories( - username: String, - pagination: Option[Pagination], - headers: Map[String, String] - ): F[GHResponse[List[WatchedRepository]]] = + username: String, + pagination: Option[Pagination], + headers: Map[String, String] + ): F[GHResponse[List[WatchedRepository]]] = client.get[List[WatchedRepository]]( s"users/$username/subscriptions", headers = headers, diff --git a/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala b/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala index 0084ad4cb..bde51891a 100644 --- a/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala +++ b/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala @@ -144,7 +144,6 @@ trait ActivitiesSpec extends BaseIntegrationSpec { response.statusCode shouldBe notFoundStatusCode } - "Activity >> ListWatchedRepositories" should "return the expected list of watched repos" taggedAs Integration in { val response = clientResource .use { client => @@ -153,11 +152,9 @@ trait ActivitiesSpec extends BaseIntegrationSpec { } .unsafeRunSync() - testIsRight[List[WatchedRepository]]( + testIsRight[List[WatchedRepository]]( response, - { r => - r.nonEmpty shouldBe true - } + r => r.nonEmpty shouldBe true ) response.statusCode shouldBe okStatusCode } From f57c0ebeea28d97b9cad4453e3577deba5db2f6f Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Jun 2021 16:35:44 +0100 Subject: [PATCH 3/4] added an extra test --- AUTHORS.md | 75 ------- CONTRIBUTING.md | 31 --- LICENSE.md | 201 ------------------ NOTICE.md | 9 - README.md | 31 --- .../scala/github4s/algebras/Activities.scala | 2 +- .../github4s/integration/ActivitiesSpec.scala | 22 +- 7 files changed, 21 insertions(+), 350 deletions(-) delete mode 100644 AUTHORS.md delete mode 100644 CONTRIBUTING.md delete mode 100644 LICENSE.md delete mode 100644 NOTICE.md delete mode 100644 README.md diff --git a/AUTHORS.md b/AUTHORS.md deleted file mode 100644 index e119d46af..000000000 --- a/AUTHORS.md +++ /dev/null @@ -1,75 +0,0 @@ -[comment]: <> (Don't edit this file!) -[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) -[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) - -# Authors - -## Maintainers - -The maintainers of the project are: - -- [![bond15](https://avatars.githubusercontent.com/u/9124653?v=4&s=20) **bond15**](https://github.com/bond15) -- [![47erbot](https://avatars.githubusercontent.com/u/24799081?v=4&s=20) **47erbot**](https://github.com/47erbot) -- [![AdrianRaFo](https://avatars.githubusercontent.com/u/15971742?v=4&s=20) **Adrian Ramirez Fornell (AdrianRaFo)**](https://github.com/AdrianRaFo) -- [![alejandrohdezma](https://avatars.githubusercontent.com/u/9027541?v=4&s=20) **Alejandro Hernández (alejandrohdezma)**](https://github.com/alejandrohdezma) -- [![anamariamv](https://avatars.githubusercontent.com/u/2183589?v=4&s=20) **Ana Mª Marquez (anamariamv)**](https://github.com/anamariamv) -- [![AntonioMateoGomez](https://avatars.githubusercontent.com/u/25897490?v=4&s=20) **Antonio Mateo (AntonioMateoGomez)**](https://github.com/AntonioMateoGomez) -- [![BenFradet](https://avatars.githubusercontent.com/u/1737211?v=4&s=20) **Ben Fradet (BenFradet)**](https://github.com/BenFradet) -- [![fedefernandez](https://avatars.githubusercontent.com/u/720923?v=4&s=20) **Fede Fernández (fedefernandez)**](https://github.com/fedefernandez) -- [![jdesiloniz](https://avatars.githubusercontent.com/u/2835739?v=4&s=20) **Javier de Silóniz Sandino (jdesiloniz)**](https://github.com/jdesiloniz) -- [![JesusMtnez](https://avatars.githubusercontent.com/u/8639179?v=4&s=20) **Jesús Martínez (JesusMtnez)**](https://github.com/JesusMtnez) -- [![juanpedromoreno](https://avatars.githubusercontent.com/u/4879373?v=4&s=20) **Juan Pedro Moreno (juanpedromoreno)**](https://github.com/juanpedromoreno) -- [![calvellido](https://avatars.githubusercontent.com/u/7753447?v=4&s=20) **Juan Valencia (calvellido)**](https://github.com/calvellido) -- [![MaureenElsberry](https://avatars.githubusercontent.com/u/17556002?v=4&s=20) **Maureen Elsberry (MaureenElsberry)**](https://github.com/MaureenElsberry) -- [![pepegar](https://avatars.githubusercontent.com/u/694179?v=4&s=20) **Pepe García (pepegar)**](https://github.com/pepegar) -- [![peterneyens](https://avatars.githubusercontent.com/u/6407606?v=4&s=20) **Peter Neyens (peterneyens)**](https://github.com/peterneyens) -- [![rafaparadela](https://avatars.githubusercontent.com/u/315070?v=4&s=20) **Rafa Paradela (rafaparadela)**](https://github.com/rafaparadela) -- [![sloshy](https://avatars.githubusercontent.com/u/427237?v=4&s=20) **Ryan Peters (sloshy)**](https://github.com/sloshy) - -## Contributors - -These are the people that have contributed to the _github4s_ project: - -- [![BenFradet](https://avatars.githubusercontent.com/u/1737211?v=4&s=20) **BenFradet**](https://github.com/BenFradet) -- [![juanpedromoreno](https://avatars.githubusercontent.com/u/4879373?v=4&s=20) **juanpedromoreno**](https://github.com/juanpedromoreno) -- [![47erbot](https://avatars.githubusercontent.com/u/24799081?v=4&s=20) **47erbot**](https://github.com/47erbot) -- [![rafaparadela](https://avatars.githubusercontent.com/u/315070?v=4&s=20) **rafaparadela**](https://github.com/rafaparadela) -- [![47degdev](https://avatars.githubusercontent.com/u/5580770?v=4&s=20) **47degdev**](https://github.com/47degdev) -- [![fedefernandez](https://avatars.githubusercontent.com/u/720923?v=4&s=20) **fedefernandez**](https://github.com/fedefernandez) -- [![jdesiloniz](https://avatars.githubusercontent.com/u/2835739?v=4&s=20) **jdesiloniz**](https://github.com/jdesiloniz) -- [![anamariamv](https://avatars.githubusercontent.com/u/2183589?v=4&s=20) **anamariamv**](https://github.com/anamariamv) -- [![sloshy](https://avatars.githubusercontent.com/u/427237?v=4&s=20) **sloshy**](https://github.com/sloshy) -- [![calvellido](https://avatars.githubusercontent.com/u/7753447?v=4&s=20) **calvellido**](https://github.com/calvellido) -- [![AdrianRaFo](https://avatars.githubusercontent.com/u/15971742?v=4&s=20) **AdrianRaFo**](https://github.com/AdrianRaFo) -- [![alejandrohdezma](https://avatars.githubusercontent.com/u/9027541?v=4&s=20) **alejandrohdezma**](https://github.com/alejandrohdezma) -- [![georgeorfanidi](https://avatars.githubusercontent.com/u/24582954?v=4&s=20) **georgeorfanidi**](https://github.com/georgeorfanidi) -- [![mfirry](https://avatars.githubusercontent.com/u/1107071?v=4&s=20) **mfirry**](https://github.com/mfirry) -- [![mkobzik](https://avatars.githubusercontent.com/u/18078706?v=4&s=20) **mkobzik**](https://github.com/mkobzik) -- [![AntonioMateoGomez](https://avatars.githubusercontent.com/u/25897490?v=4&s=20) **AntonioMateoGomez**](https://github.com/AntonioMateoGomez) -- [![duanebester](https://avatars.githubusercontent.com/u/2539656?v=4&s=20) **duanebester**](https://github.com/duanebester) -- [![lloydmeta](https://avatars.githubusercontent.com/u/914805?v=4&s=20) **lloydmeta**](https://github.com/lloydmeta) -- [![aleksandr-vin](https://avatars.githubusercontent.com/u/223293?v=4&s=20) **aleksandr-vin**](https://github.com/aleksandr-vin) -- [![loonydev](https://avatars.githubusercontent.com/u/7644109?v=4&s=20) **loonydev**](https://github.com/loonydev) -- [![GRBurst](https://avatars.githubusercontent.com/u/4647221?v=4&s=20) **GRBurst**](https://github.com/GRBurst) -- [![JesusMtnez](https://avatars.githubusercontent.com/u/8639179?v=4&s=20) **JesusMtnez**](https://github.com/JesusMtnez) -- [![YarekTyshchenko](https://avatars.githubusercontent.com/u/185304?v=4&s=20) **YarekTyshchenko**](https://github.com/YarekTyshchenko) -- [![bond15](https://avatars.githubusercontent.com/u/9124653?v=4&s=20) **bond15**](https://github.com/bond15) -- [![zachkirlew](https://avatars.githubusercontent.com/u/15320944?v=4&s=20) **zachkirlew**](https://github.com/zachkirlew) -- [![kusaeva](https://avatars.githubusercontent.com/u/5486933?v=4&s=20) **kusaeva**](https://github.com/kusaeva) -- [![pepegar](https://avatars.githubusercontent.com/u/694179?v=4&s=20) **pepegar**](https://github.com/pepegar) -- [![reimai](https://avatars.githubusercontent.com/u/1123908?v=4&s=20) **reimai**](https://github.com/reimai) -- [![nihirash](https://avatars.githubusercontent.com/u/5459892?v=4&s=20) **nihirash**](https://github.com/nihirash) -- [![asoltysik](https://avatars.githubusercontent.com/u/17353292?v=4&s=20) **asoltysik**](https://github.com/asoltysik) -- [![chalenge](https://avatars.githubusercontent.com/u/5385518?v=4&s=20) **chalenge**](https://github.com/chalenge) -- [![dcsobral](https://avatars.githubusercontent.com/u/141079?v=4&s=20) **dcsobral**](https://github.com/dcsobral) -- [![drwlrsn](https://avatars.githubusercontent.com/u/981387?v=4&s=20) **drwlrsn**](https://github.com/drwlrsn) -- [![guersam](https://avatars.githubusercontent.com/u/969120?v=4&s=20) **guersam**](https://github.com/guersam) -- [![kalexmills](https://avatars.githubusercontent.com/u/22620342?v=4&s=20) **kalexmills**](https://github.com/kalexmills) -- [![mscharley](https://avatars.githubusercontent.com/u/336509?v=4&s=20) **mscharley**](https://github.com/mscharley) -- [![MaureenElsberry](https://avatars.githubusercontent.com/u/17556002?v=4&s=20) **MaureenElsberry**](https://github.com/MaureenElsberry) -- [![mikegirkin](https://avatars.githubusercontent.com/u/4907402?v=4&s=20) **mikegirkin**](https://github.com/mikegirkin) -- [![peterneyens](https://avatars.githubusercontent.com/u/6407606?v=4&s=20) **peterneyens**](https://github.com/peterneyens) -- [![raulraja](https://avatars.githubusercontent.com/u/456796?v=4&s=20) **raulraja**](https://github.com/raulraja) -- [![satorg](https://avatars.githubusercontent.com/u/3954178?v=4&s=20) **satorg**](https://github.com/satorg) -- [![suhasgaddam](https://avatars.githubusercontent.com/u/7282584?v=4&s=20) **suhasgaddam**](https://github.com/suhasgaddam) -- [![oybek](https://avatars.githubusercontent.com/u/2409985?v=4&s=20) **oybek**](https://github.com/oybek) \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index aead52135..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,31 +0,0 @@ -[comment]: <> (Don't edit this file!) -[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) -[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) - -# Contributing - -Discussion around _github4s_ happens in the [GitHub issues](https://github.com/47degrees/github4s/issues) and [pull requests](https://github.com/47degrees/github4s/pulls). - -Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about -the code. Pull requests are also welcome. - -People are expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md) when discussing _github4s_ on the Github page or other venues. - -If you are being harassed, please contact one of [us](AUTHORS.md#maintainers) immediately so that we can support you. In case you cannot get in touch with us please write an email to [47 Degrees Open Source](mailto:hello@47deg.com). - -## How can I help? - -_github4s_ follows a standard [fork and pull](https://help.github.com/articles/using-pull-requests/) model for contributions via GitHub pull requests. - -The process is simple: - - 1. Find something you want to work on - 2. Let us know you are working on it via GitHub issues/pull requests - 3. Implement your contribution - 4. Write tests - 5. Update the documentation - 6. Submit pull request - -You will be automatically included in the [AUTHORS.md](AUTHORS.md#contributors) file as contributor in the next release. - -If you encounter any confusion or frustration during the contribution process, please create a GitHub issue and we'll do our best to improve the process. \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 61f6eedd5..000000000 --- a/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (C) 2016-2021 47 Degrees Open Source - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/NOTICE.md b/NOTICE.md deleted file mode 100644 index 54bb181e5..000000000 --- a/NOTICE.md +++ /dev/null @@ -1,9 +0,0 @@ -[comment]: <> (Don't edit this file!) -[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) -[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) - -github4s - -Copyright (c) 2016-2021 47 Degrees Open Source. All rights reserved. - -Licensed under Apache-2.0. See [LICENSE](LICENSE.md) for terms. \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 84c2dadb1..000000000 --- a/README.md +++ /dev/null @@ -1,31 +0,0 @@ - -[![Join the chat at https://gitter.im/47degrees/github4s](https://badges.gitter.im/47degrees/github4s.svg)](https://gitter.im/47degrees/github4s?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![codecov.io](http://codecov.io/gh/47degrees/github4s/branch/master/graph/badge.svg)](http://codecov.io/gh/47degrees/github4s) [![Maven Central](https://img.shields.io/badge/maven%20central-0.28.1-green.svg)](https://oss.sonatype.org/#nexus-search;gav~com.47deg~github4s*) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/47degrees/github4s/master/LICENSE) [![Latest version](https://img.shields.io/badge/github4s-0.28.1-green.svg)](https://index.scala-lang.org/47degrees/github4s) [![GitHub Issues](https://img.shields.io/github/issues/47degrees/github4s.svg)](https://github.com/47degrees/github4s/issues) - -Github4s -============= - -**Github4s** is a GitHub API wrapper written in Scala. - -## Installation - -To get started with SBT, simply add the following to your build.sbt file. - -```scala -libraryDependencies += "com.47deg" %% "github4s" % "0.28.1" -``` - -## Github4s in the wild - -If you wish to add your library here please consider a PR to include it in the list below. - -★ | ★ | ★ ---- | --- | --- -![scala-exercises](https://www.scala-exercises.org/assets/images/navbar_brand.svg) | [**scala-exercises**](https://www.scala-exercises.org/) | Scala Exercises is an Open Source project for learning different technologies based in the Scala Programming Language. -| | [**dashing**](https://github.com/benfradet/dashing) | Dashing is a collection of dashboards to monitor the health of an open source organization. -| | [**cla-bot**](https://github.com/snowplow-incubator/cla-bot) | Bot making sure external contributors sign a CLA. - -# Copyright - -Github4s is designed and developed by 47 Degrees - -Copyright (C) 2016-2020 47 Degrees. diff --git a/github4s/src/main/scala/github4s/algebras/Activities.scala b/github4s/src/main/scala/github4s/algebras/Activities.scala index cd658e4f5..bcb205752 100644 --- a/github4s/src/main/scala/github4s/algebras/Activities.scala +++ b/github4s/src/main/scala/github4s/algebras/Activities.scala @@ -86,7 +86,7 @@ trait Activities[F[_]] { */ def listWatchedRespositories( username: String, - pagination: Option[Pagination], + pagination: Option[Pagination] = None, headers: Map[String, String] = Map() ): F[GHResponse[List[WatchedRepository]]] diff --git a/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala b/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala index bde51891a..4d8967605 100644 --- a/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala +++ b/github4s/src/test/scala/github4s/integration/ActivitiesSpec.scala @@ -125,6 +125,8 @@ trait ActivitiesSpec extends BaseIntegrationSpec { testIsRight[List[StarredRepository]]( response, { r => + println("Here is response") + println(r) r.nonEmpty shouldBe true forAll(r)(s => s.starred_at shouldBe defined) } @@ -144,11 +146,27 @@ trait ActivitiesSpec extends BaseIntegrationSpec { response.statusCode shouldBe notFoundStatusCode } - "Activity >> ListWatchedRepositories" should "return the expected list of watched repos" taggedAs Integration in { + "Activity >> ListWatchedRepositories" should "return empty list if user has no watched repos" taggedAs Integration in { val response = clientResource .use { client => Github[IO](client, accessToken).activities - .listWatchedRespositories(validUsername, None, headers = headerUserAgent) + .listWatchedRespositories(validUsername, headers = headerUserAgent) + } + .unsafeRunSync() + + testIsRight[List[WatchedRepository]]( + response, + r => r.isEmpty shouldBe true + ) + response.statusCode shouldBe okStatusCode + } + + it should "return expected list of watched repos" taggedAs Integration in { + + val response = clientResource + .use { client => + Github[IO](client, accessToken).activities + .listWatchedRespositories(validUsername, headers = headerUserAgent) } .unsafeRunSync() From aee1e619a02c8ab9e561841f615a9141d65e7b2e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 15 Jun 2021 08:07:08 +0100 Subject: [PATCH 4/4] accidently removed --- AUTHORS.md | 16 ++++ CONTRIBUTING.md | 31 ++++++++ LICENSE.md | 201 ++++++++++++++++++++++++++++++++++++++++++++++++ NOTICE.md | 9 +++ README.md | 31 ++++++++ 5 files changed, 288 insertions(+) create mode 100644 AUTHORS.md create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE.md create mode 100644 NOTICE.md create mode 100644 README.md diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 000000000..24bcd1095 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,16 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +# Authors + +## Maintainers + +The maintainers of the project are: + + + +## Contributors + +These are the people that have contributed to the _github4s_ project: + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..04018dce6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +# Contributing + +Discussion around _github4s_ happens in the [GitHub issues](https://github.com//issues) and [pull requests](https://github.com//pulls). + +Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about +the code. Pull requests are also welcome. + +People are expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md) when discussing _github4s_ on the Github page or other venues. + +If you are being harassed, please contact one of [us](AUTHORS.md#maintainers) immediately so that we can support you. In case you cannot get in touch with us please write an email to [com.47deg](mailto:). + +## How can I help? + +_github4s_ follows a standard [fork and pull](https://help.github.com/articles/using-pull-requests/) model for contributions via GitHub pull requests. + +The process is simple: + + 1. Find something you want to work on + 2. Let us know you are working on it via GitHub issues/pull requests + 3. Implement your contribution + 4. Write tests + 5. Update the documentation + 6. Submit pull request + +You will be automatically included in the [AUTHORS.md](AUTHORS.md#contributors) file as contributor in the next release. + +If you encounter any confusion or frustration during the contribution process, please create a GitHub issue and we'll do our best to improve the process. \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..3811c9ed5 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (C) com.47deg + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 000000000..c0328fa1c --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,9 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +github4s + +Copyright (c) com.47deg. All rights reserved. + +Licensed under . See [LICENSE](LICENSE.md) for terms. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 000000000..e02c78efd --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ + +[![Join the chat at https://gitter.im/47degrees/github4s](https://badges.gitter.im/47degrees/github4s.svg)](https://gitter.im/47degrees/github4s?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![codecov.io](http://codecov.io/gh/47degrees/github4s/branch/master/graph/badge.svg)](http://codecov.io/gh/47degrees/github4s) [![Maven Central](https://img.shields.io/badge/maven%20central-0.28.5-green.svg)](https://oss.sonatype.org/#nexus-search;gav~com.47deg~github4s*) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/47degrees/github4s/master/LICENSE) [![Latest version](https://img.shields.io/badge/github4s-0.28.5-green.svg)](https://index.scala-lang.org/47degrees/github4s) [![GitHub Issues](https://img.shields.io/github/issues/47degrees/github4s.svg)](https://github.com/47degrees/github4s/issues) + +Github4s +============= + +**Github4s** is a GitHub API wrapper written in Scala. + +## Installation + +To get started with SBT, simply add the following to your build.sbt file. + +```scala +libraryDependencies += "com.47deg" %% "github4s" % "0.28.5" +``` + +## Github4s in the wild + +If you wish to add your library here please consider a PR to include it in the list below. + +★ | ★ | ★ +--- | --- | --- +![scala-exercises](https://www.scala-exercises.org/assets/images/navbar_brand.svg) | [**scala-exercises**](https://www.scala-exercises.org/) | Scala Exercises is an Open Source project for learning different technologies based in the Scala Programming Language. +| | [**dashing**](https://github.com/benfradet/dashing) | Dashing is a collection of dashboards to monitor the health of an open source organization. +| | [**cla-bot**](https://github.com/snowplow-incubator/cla-bot) | Bot making sure external contributors sign a CLA. + +# Copyright + +Github4s is designed and developed by 47 Degrees + +Copyright (C) 2016-2020 47 Degrees.