File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ object Config {
784784 cfg.require[String ](" client-secret" ),
785785 cfg.require[String ](" redirect-uri" ),
786786 cfg.require[String ](" scope" ),
787- AccessToken (cfg.require[String ](" access-token" )),
787+ AccessToken (cfg.require[String ](" access-token" ), isPrivate = true ),
788788 cfg.require[String ](" system-username" ),
789789 cfg.lookup[List [String ]](" organization-blacklist" ).getOrElse(Nil ),
790790 cfg.lookup[List [String ]](" organization-admins" ).getOrElse(Nil )
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ object Gitlab {
113113 }.flatMap { release =>
114114 if (release.assets.isEmpty)
115115 Task .fail(new IllegalArgumentException (
116- s " The tag ` $releaseId` for repo ` $slug` is not a valid release. " +
116+ s " The tag ' $releaseId' for repo ' $slug' is not a valid release. " +
117117 " Have you added an asset as release description?"
118118 ))
119119 else
Original file line number Diff line number Diff line change @@ -258,6 +258,7 @@ object Json {
258258 */
259259 implicit lazy val GithubEventDecoder : DecodeJson [Github .Event ] =
260260 GithubReleaseEventDecoder .asInstanceOf [DecodeJson [Github .ReleaseEvent ]] |||
261+ GitlabReleaseEventDecoder .asInstanceOf [DecodeJson [Github .ReleaseEvent ]] |||
261262 GithubPingEventDecoder .asInstanceOf [DecodeJson [Github .Event ]]
262263
263264 /**
@@ -514,6 +515,16 @@ object Json {
514515 )
515516 })
516517
518+ implicit val GitlabReleaseEventDecoder : DecodeJson [Github .ReleaseEvent ] =
519+ DecodeJson (z => for {
520+ a <- (z --\ " ref" ).as[String ]
521+ i = a.split('/' ).last
522+ p <- (z --\ " project" --\ " path_with_namespace" ).as[String ]
523+ x <- Slug .fromString(p).map(DecodeResult .ok
524+ ).valueOr(e => DecodeResult .fail(e.getMessage,z.history))
525+ e <- (z --\ " project_id" ).as[Long ]
526+ } yield Github .ReleaseEvent (id = i, slug = x, repositoryId = e))
527+
517528 /**
518529 * {
519530 * "url": "https://github.example.com/api/v3/repos/example/howdy/releases/assets/1",
You can’t perform that action at this time.
0 commit comments