Skip to content

Commit

Permalink
Merge pull request #1723 from scala-steward-org/topic/move-into-vcs
Browse files Browse the repository at this point in the history
Move bitbucket{,server}, github, gitlab packages into vcs
  • Loading branch information
fthomas committed Nov 8, 2020
2 parents 7a0d73f + 03a682c commit 538d8ab
Show file tree
Hide file tree
Showing 22 changed files with 34 additions and 34 deletions.
Expand Up @@ -19,12 +19,12 @@ package org.scalasteward.core.vcs
import io.chrisdavenport.log4cats.Logger
import org.scalasteward.core.application.Config
import org.scalasteward.core.application.SupportedVCS.{Bitbucket, BitbucketServer, GitHub, Gitlab}
import org.scalasteward.core.bitbucket.http4s.Http4sBitbucketApiAlg
import org.scalasteward.core.bitbucketserver.http4s.Http4sBitbucketServerApiAlg
import org.scalasteward.core.github.http4s.Http4sGitHubApiAlg
import org.scalasteward.core.gitlab.http4s.Http4sGitLabApiAlg
import org.scalasteward.core.util.{HttpJsonClient, MonadThrow}
import org.scalasteward.core.vcs.bitbucket.http4s.Http4sBitbucketApiAlg
import org.scalasteward.core.vcs.bitbucketserver.http4s.Http4sBitbucketServerApiAlg
import org.scalasteward.core.vcs.data.AuthenticatedUser
import org.scalasteward.core.vcs.github.http4s.Http4sGitHubApiAlg
import org.scalasteward.core.vcs.gitlab.http4s.Http4sGitLabApiAlg

final class VCSSelection[F[_]](implicit
client: HttpJsonClient[F],
Expand All @@ -33,13 +33,13 @@ final class VCSSelection[F[_]](implicit
F: MonadThrow[F]
) {
private def github(config: Config): Http4sGitHubApiAlg[F] = {
import org.scalasteward.core.github.http4s.authentication.addCredentials
import org.scalasteward.core.vcs.github.http4s.authentication.addCredentials

new Http4sGitHubApiAlg[F](config.vcsApiHost, _ => addCredentials(user))
}

private def gitlab(config: Config): Http4sGitLabApiAlg[F] = {
import org.scalasteward.core.gitlab.http4s.authentication.addCredentials
import org.scalasteward.core.vcs.gitlab.http4s.authentication.addCredentials
new Http4sGitLabApiAlg[F](
config.vcsApiHost,
user,
Expand All @@ -50,13 +50,13 @@ final class VCSSelection[F[_]](implicit
}

private def bitbucket(config: Config): Http4sBitbucketApiAlg[F] = {
import org.scalasteward.core.bitbucket.http4s.authentication.addCredentials
import org.scalasteward.core.vcs.bitbucket.http4s.authentication.addCredentials

new Http4sBitbucketApiAlg(config.vcsApiHost, user, _ => addCredentials(user), config.doNotFork)
}

private def bitbucketServer(config: Config): Http4sBitbucketServerApiAlg[F] = {
import org.scalasteward.core.bitbucket.http4s.authentication.addCredentials
import org.scalasteward.core.vcs.bitbucket.http4s.authentication.addCredentials

new Http4sBitbucketServerApiAlg[F](
config.vcsApiHost,
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.bitbucket
package org.scalasteward.core.vcs.bitbucket

import org.http4s.Uri
import org.scalasteward.core.git.Branch
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.bitbucket.http4s
package org.scalasteward.core.vcs.bitbucket.http4s

import io.circe.{Encoder, Json}
import org.scalasteward.core.git.Branch
Expand Down
Expand Up @@ -14,15 +14,15 @@
* limitations under the License.
*/

package org.scalasteward.core.bitbucket.http4s
package org.scalasteward.core.vcs.bitbucket.http4s

import cats.syntax.all._
import org.http4s.{Request, Status, Uri}
import org.scalasteward.core.bitbucket.Url
import org.scalasteward.core.bitbucket.http4s.json._
import org.scalasteward.core.git.Branch
import org.scalasteward.core.util.{HttpJsonClient, MonadThrow, UnexpectedResponse}
import org.scalasteward.core.vcs.VCSApiAlg
import org.scalasteward.core.vcs.bitbucket.Url
import org.scalasteward.core.vcs.bitbucket.http4s.json._
import org.scalasteward.core.vcs.data._

class Http4sBitbucketApiAlg[F[_]](
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.bitbucket.http4s
package org.scalasteward.core.vcs.bitbucket.http4s

import io.circe.Decoder

Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.bitbucket.http4s
package org.scalasteward.core.vcs.bitbucket.http4s

import cats.syntax.all._
import io.circe.{ACursor, Decoder, DecodingFailure, Json}
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.github.http4s
package org.scalasteward.core.vcs.bitbucket.http4s

import cats.Applicative
import cats.syntax.all._
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.bitbucket.http4s
package org.scalasteward.core.vcs.bitbucket.http4s

import io.circe.Decoder
import org.http4s.Uri
Expand Down
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

package org.scalasteward.core.bitbucketserver.http4s
package org.scalasteward.core.vcs.bitbucketserver.http4s

import cats.syntax.all._
import org.http4s.{Request, Uri}
import org.scalasteward.core.bitbucketserver.http4s.Json.{Reviewer, User}
import org.scalasteward.core.git.Branch
import org.scalasteward.core.util.{HttpJsonClient, MonadThrow}
import org.scalasteward.core.vcs.VCSApiAlg
import org.scalasteward.core.vcs.bitbucketserver.http4s.Json.{Reviewer, User}
import org.scalasteward.core.vcs.data.PullRequestState.Open
import org.scalasteward.core.vcs.data._

Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.bitbucketserver.http4s
package org.scalasteward.core.vcs.bitbucketserver.http4s

import cats.data.NonEmptyList
import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder}
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.github
package org.scalasteward.core.vcs.github

import org.http4s.Uri
import org.scalasteward.core.git.Branch
Expand Down
Expand Up @@ -14,14 +14,14 @@
* limitations under the License.
*/

package org.scalasteward.core.github.http4s
package org.scalasteward.core.vcs.github.http4s

import org.http4s.{Request, Uri}
import org.scalasteward.core.git.Branch
import org.scalasteward.core.github._
import org.scalasteward.core.util.HttpJsonClient
import org.scalasteward.core.vcs.VCSApiAlg
import org.scalasteward.core.vcs.data._
import org.scalasteward.core.vcs.github._

final class Http4sGitHubApiAlg[F[_]](
gitHubApiHost: Uri,
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.bitbucket.http4s
package org.scalasteward.core.vcs.github.http4s

import cats.Applicative
import cats.syntax.all._
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.gitlab
package org.scalasteward.core.vcs.gitlab

import org.http4s.Uri
import org.scalasteward.core.git.Branch
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.gitlab.http4s
package org.scalasteward.core.vcs.gitlab.http4s

import cats.syntax.all._
import io.chrisdavenport.log4cats.Logger
Expand All @@ -23,11 +23,11 @@ import io.circe.generic.semiauto._
import io.circe.syntax._
import org.http4s.{Request, Status, Uri}
import org.scalasteward.core.git.{Branch, Sha1}
import org.scalasteward.core.gitlab._
import org.scalasteward.core.util.uri.uriDecoder
import org.scalasteward.core.util.{HttpJsonClient, MonadThrow, UnexpectedResponse}
import org.scalasteward.core.vcs.VCSApiAlg
import org.scalasteward.core.vcs.data._
import org.scalasteward.core.vcs.gitlab._

final private[http4s] case class ForkPayload(id: String, namespace: String)
final private[http4s] case class MergeRequestPayload(
Expand Down
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.scalasteward.core.gitlab.http4s
package org.scalasteward.core.vcs.gitlab.http4s

import cats.Applicative
import cats.syntax.all._
Expand Down
@@ -1,4 +1,4 @@
package org.scalasteward.core.bitbucket.http4s
package org.scalasteward.core.vcs.bitbucket.http4s

import cats.effect.IO
import io.circe.literal._
Expand Down
@@ -1,4 +1,4 @@
package org.scalasteward.core.bitbucket.http4s
package org.scalasteward.core.vcs.bitbucket.http4s

import io.circe.Json
import org.scalasteward.core.vcs.data.PullRequestState
Expand Down
@@ -1,4 +1,4 @@
package org.scalasteward.core.github
package org.scalasteward.core.vcs.github

import org.http4s.syntax.literals._
import org.scalasteward.core.git.Branch
Expand Down
@@ -1,4 +1,4 @@
package org.scalasteward.core.github.http4s
package org.scalasteward.core.vcs.github.http4s

import cats.effect.IO
import io.circe.literal._
Expand Down
@@ -1,4 +1,4 @@
package org.scalasteward.core.github.http4s
package org.scalasteward.core.vcs.github.http4s

import cats.Id
import org.http4s.headers.{Accept, Authorization}
Expand Down
@@ -1,4 +1,4 @@
package org.scalasteward.core.gitlab.http4s
package org.scalasteward.core.vcs.gitlab.http4s

import cats.effect.IO
import io.circe.literal._
Expand Down

0 comments on commit 538d8ab

Please sign in to comment.