def forAccessToken()

in app/lib/Bot.scala [20:36]


  def forAccessToken(accessToken: String)(implicit ec: ExecutionContext): Bot = {
    val workingDir = Path.of("/tmp", "bot", "working-dir")

    val credentials: GitHubCredentials =
      GitHubCredentials.forAccessKey(accessToken, workingDir).get

    val github: GitHub = new GitHub(credentials)
    val user: User = Await.result(github.getUser().map(_.result), 3.seconds)
    logger.info(s"Token gives GitHub user ${user.atLogin}")

    Bot(
      workingDir,
      github,
      credentials.git,
      user
    )
  }