Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenCMD committed Jan 13, 2024
1 parent 83da428 commit 8d5d0d1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@ object GitHubCacheRestoration {
): F[CIPlatformCacheRestorationInstr[F]] = for {
ghCtx <- ActionsGitHub.getContext()

_ <- ciInteraction.printInfo("meow1")
token <- inputReader.readKey[String]("GITHUB_TOKEN")
_ <- ciInteraction.printInfo("meow2")
_ <- ciInteraction.printInfo(token.show)

instr = new CIPlatformCacheRestorationInstr[F] {
override def shouldRestoreCache(): F[RestoreCacheOrSkip] = {
import RestoreCacheOrSkip.*
val program = for {
commitMessages: List[String] <- EitherT.liftF {
ciInteraction.printInfo("meow1") *>
ciInteraction.printInfo(ghCtx.eventName) *>
ciInteraction.printInfo(ghCtx.payload.action) *>
ghCtx.eventName match {
case "push" => ghCtx.payload.asInstanceOf[PushEvent].commits.toList.map(_.message).pure[F]
case "pull_request" if List("opened", "reopened", "synchronize").contains(ghCtx.payload.action) =>
ciInteraction.printInfo("meow2") *>
token.toOption.filter(_.nonEmpty).fold(
ciInteraction
.printWarning(
Expand Down

0 comments on commit 8d5d0d1

Please sign in to comment.