Skip to content

kijuky/jira-for-scala

Repository files navigation

jira-for-scala

Example

sbt console

[env]
JIRA_SERVER_URI = "serverUri"
JIRA_ACCESS_TOKEN = "accessToken"
mise trust
sbt console
val jira = new io.github.kijuky.jira.JiraFacade("serverUri", "accessToken")
import jira.Implicits._

jira.issues(filterId = xxxxx).foreach(i => println(i.summary))

cake pattern

import io.github.kijuky.jira.Implicits._
trait JiraComponent {
  implicit lazy val jira: JiraClient = createJiraClient("serverUri", "accessToken")
}
import io.github.kijuky.jira.Implicits._
object Main extends App with JiraComponent {
  jira.issues(filterId = xxxxx).foreach(i => println(i.summary))
}

zio

import io.github.kijuky.zio.jira._
import zio._
object Main extends ZIOAppDefault {
  def run = {
    for {
      issues <- JiraIssueRepo.list(filterId = xxxxx)
      _ <- ZIO.foreach(issues)(i => Console.printLine(i.summary))
    } yield ()
  }.provide(JiraService.layer, JiraIssueRepoImpl.layer)
}

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages