-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
118 additions
and
24 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
93 changes: 80 additions & 13 deletions
93
...scala/com/github/chencmd/datapacklinter/ciplatform/ghactions/GitHubCacheRestoration.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
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
18 changes: 18 additions & 0 deletions
18
...in/scala/com/github/chencmd/datapacklinter/ciplatform/ghactions/utils/ActionsGitHub.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,18 @@ | ||
package com.github.chencmd.datapacklinter.ciplatform.ghactions.utils | ||
|
||
import com.github.chencmd.datapacklinter.generic.AsyncExtra | ||
|
||
import cats.effect.kernel.Async | ||
import cats.implicits.* | ||
|
||
import scala.scalajs.js | ||
|
||
private trait ActionsGitHub extends js.Object { | ||
val context: typings.actionsGithub.libContextMod.Context | ||
} | ||
|
||
object ActionsGitHub { | ||
def getContext[F[_]: Async](): F[typings.actionsGithub.libContextMod.Context] = { | ||
AsyncExtra.fromPromise(js.`import`[ActionsGitHub]("@actions/github")).map(_.context) | ||
} | ||
} |