File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
modules/core/src/main/scala/org/scalasteward/core/forge/github Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -429,12 +429,15 @@ lazy val runSteward = taskKey[Unit]("")
429
429
runSteward := Def .taskDyn {
430
430
val home = System .getenv(" HOME" )
431
431
val projectDir = (LocalRootProject / baseDirectory).value
432
+ // val ghAppDir = projectDir.getParentFile / "gh-app"
432
433
val args = Seq (
433
434
Seq (" --workspace" , s " $projectDir/workspace " ),
434
435
Seq (" --repos-file" , s " $projectDir/repos.md " ),
435
436
Seq (" --git-author-email" , s " me@ $projectName.org " ),
436
437
Seq (" --forge-login" , projectName),
437
438
Seq (" --git-ask-pass" , s " $home/.github/askpass/ $projectName.sh " ),
439
+ // Seq("--github-app-id", IO.read(ghAppDir / "scala-steward.app-id.txt").trim),
440
+ // Seq("--github-app-key-file", s"$ghAppDir/scala-steward.private-key.pem"),
438
441
Seq (" --whitelist" , s " $home/.cache/coursier " ),
439
442
Seq (" --whitelist" , s " $home/.cache/JNA " ),
440
443
Seq (" --whitelist" , s " $home/.cache/mill " ),
Original file line number Diff line number Diff line change @@ -19,14 +19,13 @@ package org.scalasteward.core.forge.github
19
19
import better .files .File
20
20
import cats .effect .Sync
21
21
import cats .implicits ._
22
- import io .jsonwebtoken .{Jwts , SignatureAlgorithm }
23
- import org .bouncycastle .jce .provider .BouncyCastleProvider
24
- import org .bouncycastle .util .io .pem .PemReader
25
-
22
+ import io .jsonwebtoken .Jwts
26
23
import java .io .FileReader
27
24
import java .security .spec .PKCS8EncodedKeySpec
28
25
import java .security .{KeyFactory , PrivateKey , Security }
29
26
import java .util .Date
27
+ import org .bouncycastle .jce .provider .BouncyCastleProvider
28
+ import org .bouncycastle .util .io .pem .PemReader
30
29
import scala .concurrent .duration .FiniteDuration
31
30
import scala .util .Using
32
31
@@ -72,13 +71,13 @@ object GitHubAuthAlg {
72
71
val signingKey = readPrivateKey(app.keyFile)
73
72
val builder = Jwts
74
73
.builder()
75
- .setIssuedAt (now)
76
- .setIssuer (app.id.toString)
77
- .signWith(signingKey, SignatureAlgorithm .RS256 )
74
+ .issuedAt (now)
75
+ .issuer (app.id.toString)
76
+ .signWith(signingKey, Jwts . SIG .RS256 )
78
77
if (ttlMillis > 0 ) {
79
78
val expMillis = nowMillis + ttlMillis
80
79
val exp = new Date (expMillis)
81
- builder.setExpiration (exp)
80
+ builder.expiration (exp)
82
81
}
83
82
builder.compact()
84
83
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ object Dependencies {
30
30
val http4sJdkhttpClient = " org.http4s" %% " http4s-jdk-http-client" % " 1.0.0-M9"
31
31
val log4catsSlf4j = " org.typelevel" %% " log4cats-slf4j" % " 2.6.0"
32
32
val logbackClassic = " ch.qos.logback" % " logback-classic" % " 1.4.14"
33
- val jjwtApi = " io.jsonwebtoken" % " jjwt-api" % " 0.11.5 "
33
+ val jjwtApi = " io.jsonwebtoken" % " jjwt-api" % " 0.12.3 "
34
34
val jjwtImpl = " io.jsonwebtoken" % " jjwt-impl" % jjwtApi.revision
35
35
val jjwtJackson = " io.jsonwebtoken" % " jjwt-jackson" % jjwtApi.revision
36
36
val millScriptVersion = " 0.11.0-M10"
You can’t perform that action at this time.
0 commit comments