Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames GH token env var #405

Merged
merged 1 commit into from
Apr 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
test:
runs-on: ubuntu-latest
env:
G4S_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
steps:
- name: Checkout project
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
documentation:
runs-on: ubuntu-latest
env:
G4S_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
steps:
- name: Checkout project
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ lazy val github4s =
buildInfoKeys := Seq[BuildInfoKey](
name,
version,
"token" -> sys.env.getOrElse("G4S_TOKEN", "")
"token" -> sys.env.getOrElse("GITHUB_TOKEN", "")
),
buildInfoPackage := "github4s"
)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The first step we need to take in order to run the tests is a valid token which
environment variable:

```bash
export G4S_TOKEN=aaaa
export GITHUB_TOKEN=aaaa
```

You can create a token on Github: <https://github.com/settings/tokens>.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ As an introductory example, we can get a user with the following:

```scala mdoc:silent
import github4s.Github
val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val user1 = Github[IO](httpClient, accessToken).users.get("rafaparadela")
```

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/gist.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand All @@ -49,7 +49,7 @@ To create a gist:
```scala mdoc:compile-only
import github4s.domain.GistFile
val gistfiles = Map(
"token.scala" -> GistFile("val accessToken = sys.env.get(\"G4S_TOKEN\")"),
"token.scala" -> GistFile("val accessToken = sys.env.get(\"GITHUB_TOKEN\")"),
"gh4s.scala" -> GistFile("val gh = Github(accessToken)")
)
val newGist = gh.gists.newGist("Github4s entry point", public = true, gistfiles)
Expand Down Expand Up @@ -111,7 +111,7 @@ To edit a gist (change description, update content of _token.scala_, rename _gh4
```scala mdoc:compile-only
import github4s.domain.EditGistFile
val editfiles = Map(
"token.scala" -> Some(EditGistFile("lazy val accessToken = sys.env.get(\"G4S_TOKEN\")")),
"token.scala" -> Some(EditGistFile("lazy val accessToken = sys.env.get(\"GITHUB_TOKEN\")")),
"gh4s.scala" -> Some(EditGistFile("val gh = Github(accessToken)", Some("GH4s.scala"))),
"token.class" -> None
)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/git_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/pull_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ val httpClient: Client[IO] = {
JavaNetClientBuilder[IO](blocker).create // use BlazeClientBuilder for production use
}

val accessToken = sys.env.get("G4S_TOKEN")
val accessToken = sys.env.get("GITHUB_TOKEN")
val gh = Github[IO](httpClient, accessToken)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class IntegrationSpec

object Integration
extends Tag(
if (sys.env.get("G4S_TOKEN").exists(_.nonEmpty)) ""
if (sys.env.get("GITHUB_TOKEN").exists(_.nonEmpty)) ""
else classOf[Ignore].getName
)

Expand All @@ -59,7 +59,7 @@ abstract class BaseIntegrationSpec

val clientResource: Resource[IO, Client[IO]] = BlazeClientBuilder[IO](executionContext).resource

def accessToken: Option[String] = sys.env.get("G4S_TOKEN")
def accessToken: Option[String] = sys.env.get("GITHUB_TOKEN")

def testIsRight[A](response: GHResponse[A], f: A => Assertion = (_: A) => succeed): Assertion = {
response.result.isRight shouldBe true
Expand Down
2 changes: 1 addition & 1 deletion project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ object ProjectPlugin extends AutoPlugin {
case _ => withStripedLinter
}) :+ "-language:higherKinds"
},
orgGithubTokenSetting := "G4S_TOKEN",
orgGithubTokenSetting := "GITHUB_TOKEN",
orgBadgeListSetting := List(
TravisBadge.apply(_),
GitterBadge.apply(_),
Expand Down