This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Helper functions | |
| function git_current_branch | |
| git branch --show-current | |
| end | |
| function git_main_branch | |
| command git rev-parse --git-dir &>/dev/null || return | |
| for ref in refs/heads/main refs/heads/trunk refs/heads/mainline refs/heads/default refs/heads/master | |
| if command git show-ref -q --verify $ref | |
| echo (string split -r -m1 / $ref)[2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import arrow.core.left | |
| import arrow.core.right | |
| import io.ktor.client.HttpClient | |
| import io.ktor.client.call.body | |
| import io.ktor.client.plugins.auth.Auth | |
| import io.ktor.client.plugins.auth.providers.BearerAuthProvider | |
| import io.ktor.client.plugins.plugin | |
| import io.ktor.client.request.HttpRequestBuilder | |
| import io.ktor.client.request.get | |
| import io.ktor.client.request.post |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example | |
| import kotlinx.coroutines.* | |
| import kotlinx.coroutines.flow.* | |
| /** | |
| * Merges the given flows into a new [MutableStateFlow] with the provided initial state, | |
| * scope, and launch strategy. | |
| * | |
| * @param T The type of the state held by the [MutableStateFlow]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun main() { | |
| println("Hello, world!") | |
| } |