Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kijuky/jira-for-scala


https://github.com/kijuky/jira-for-scala

jira scala

Last synced: 18 days ago
JSON representation

Awesome Lists containing this project

README

        

# jira-for-scala

## Example

### sbt console

```toml
[env]
JIRA_SERVER_URI = "serverUri"
JIRA_ACCESS_TOKEN = "accessToken"
```

```shell
mise trust
sbt console
```

```scala
val jira = new io.github.kijuky.jira.JiraFacade("serverUri", "accessToken")
import jira.Implicits._

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

### cake pattern

```scala
import io.github.kijuky.jira.Implicits._
trait JiraComponent {
implicit lazy val jira: JiraClient = createJiraClient("serverUri", "accessToken")
}
```

```scala
import io.github.kijuky.jira.Implicits._
object Main extends App with JiraComponent {
jira.issues(filterId = xxxxx).foreach(i => println(i.summary))
}
```

### zio

```scala
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)
}
```