-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for custom CI service auth strategies (#274)
- Loading branch information
1 parent
10ff249
commit 292581b
Showing
5 changed files
with
105 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
24 changes: 24 additions & 0 deletions
24
src/main/scala/org/scoverage/coveralls/CoverallsAuth.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.scoverage.coveralls | ||
|
||
import scala.io.Source | ||
import io.circe._ | ||
import io.circe.parser | ||
import io.circe.generic.auto._ | ||
|
||
/** The strategy to use when authenticating against Coveralls. | ||
*/ | ||
sealed trait CoverallsAuth | ||
|
||
/** Auth strategy where a Coveralls-specific token is used. Works with every CI | ||
* service. | ||
*/ | ||
case class CoverallsRepoToken(token: String) extends CoverallsAuth | ||
|
||
/** Auth strategy where a token specific to the CI service is used, such as a | ||
* GitHub token. Works on selected CI services supported by Coveralls. | ||
*/ | ||
case class CIServiceToken(token: String) extends CoverallsAuth | ||
|
||
/** Auth strategy where no token is passed. This seems to work for Travis. | ||
*/ | ||
case object NoTokenNeeded extends CoverallsAuth |
This file contains 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
This file contains 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