Conversation
|
Hi @djspiewak , can we merge and publish this change? Was debugging an issue with IntelliJ and was thinking the exact same solution as @iRevive suggests here. Many thanks. |
| final case class Environment(variable: String) extends TokenSource | ||
| final case class Property(key: String) extends TokenSource | ||
| final case class GitConfig(key: String) extends TokenSource | ||
| final case class Or(primary: TokenSource, secondary: TokenSource) extends TokenSource |
There was a problem hiding this comment.
Nice to Have. A Or method with the three parameters.
There was a problem hiding this comment.
Two parameters should be enough:
val source: TokenSource = TokenSource.Environment("TOKEN_1") || TokenSource.GitConfig("config") ||
TokenSource.Property("PROPERTY_TOKEN") || TokenSource.Environment("TOKEN_2")Encoded as:
val source: TokenSource = TokenSource.Or(
TokenSource.Environment("TOKEN_1"),
TokenSource.Or(
TokenSource.GitConfig("config"),
TokenSource.Or(
TokenSource.Property("PROPERTY_TOKEN"),
TokenSource.Environment("TOKEN_2")
)
)
)|
@iRevive I stole part of this idea for https://github.com/er1c/sbt-github/pull/2/files is that ok? it was interesting to work through some of the sbt tests, you have to nest a |
|
@er1c no worries. I'm glad my changes are used for good :) |
The aim of the PR is to solve IntelliJ IDEA importing issue.
IDEA correctly picks up properties from
.sbtoptsfile and therefore can download dependencies from the GitHub maven repository.Partially solves #24, #26, and #42.