Skip to content

Commit

Permalink
Rename all occurrences of github_integration_id to github_app_id
Browse files Browse the repository at this point in the history
* Replace GITHUB_INTEGRATION_ID by GITHUB_APP_ID after GitHub decided to change the name

* Remove unnecessary commented out code.
  • Loading branch information
vinhnglx authored and suprnova32 committed Oct 13, 2017
1 parent b8b96e7 commit 0d37680
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"description": "GitHub OAuth client secret",
"value": ""
},
"GITHUB_INTEGRATION_ID": {
"description": "GitHub Integration ID",
"GITHUB_APP_ID": {
"description": "GitHub App ID",
"value": ""
},
"GITHUB_PRIVATE_KEY": {
Expand Down
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use Mix.Config
config :alloy_ci,
ecto_repos: [AlloyCi.Repo],
github_api: AlloyCi.Github.Live,
integration_id: System.get_env("GITHUB_INTEGRATION_ID"),
app_id: System.get_env("GITHUB_APP_ID"),
app_url: System.get_env("GITHUB_APP_URL"),
private_key: System.get_env("GITHUB_PRIVATE_KEY"),
runner_registration_token: System.get_env("RUNNER_REGISTRATION_TOKEN"),
Expand Down
2 changes: 1 addition & 1 deletion config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use Mix.Config
# which you typically run after static files are built.
# General application configuration
config :alloy_ci,
integration_id: "${GITHUB_INTEGRATION_ID}",
app_id: "${GITHUB_APP_ID}",
app_url: "${GITHUB_APP_URL}",
private_key: "${GITHUB_PRIVATE_KEY}",
runner_registration_token: "${RUNNER_REGISTRATION_TOKEN}",
Expand Down
2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use Mix.Config
config :alloy_ci,
ecto_repos: [AlloyCi.Repo],
github_api: AlloyCi.Github.Test,
integration_id: "1",
app_id: "1",
app_url: "https://github.com/alloy-ci",
private_key: "priv-key",
runner_registration_token: "lustlmc3gMl59smZ",
Expand Down
4 changes: 2 additions & 2 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Do so, and save the generated file. The contents of this file will be used for t
`GITHUB_PRIVATE_KEY` environment variable. Don't lose this file, or you will have
to generate a new key.

The `GITHUB_INTEGRATION_ID` appears on the right column, right at the end.
The `GITHUB_APP_ID` appears on the right column, right at the end.

The `GITHUB_APP_URL` will be the public link to your app. This field will
only show up, if you chose to make your installation public.
Expand Down Expand Up @@ -131,7 +131,7 @@ The required variables are as follows:
| SECRET_KEY_BASE | 65 chars long random string used to sign cookies |
| GITHUB_CLIENT_ID | OAuth Client ID of your GitHub App |
| GITHUB_CLIENT_SECRET | OAuth Client Secret of your GitHub App |
| GITHUB_INTEGRATION_ID | The ID of the installation created before |
| GITHUB_APP_ID | The ID of the App created before |
| GITHUB_APP_URL | The URL where users can add the App to their accounts |
| GITHUB_PRIVATE_KEY | The full private key used to sign GitHub's auth token |
| GITHUB_SECRET_TOKEN | Integration token used to verify GitHub payloads |
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ services:
GITHUB_CLIENT_SECRET: "<GitHub OAuth Client Secret>"
GITHUB_SECRET_TOKEN: "<GitHub Secret Token>"
SECRET_KEY_BASE: "<random 65 chars string>"
GITHUB_INTEGRATION_ID: "<GitHub Integration ID>"
GITHUB_APP_ID: "<GitHub App ID>"
GITHUB_APP_URL: "https://github.com/apps/<app_name>"
# The private key for your GitHub integration. Each new line needs
# to have a trailing line end and a backward slash \n\ in order to be
Expand Down
2 changes: 1 addition & 1 deletion lib/alloy_ci/github/github_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule AlloyCi.Github.Live do

def app_client do
key = JOSE.JWK.from_pem(Application.get_env(:alloy_ci, :private_key))
app_id = Application.get_env(:alloy_ci, :integration_id)
app_id = Application.get_env(:alloy_ci, :app_id)

payload = %{
"iat" => DateTime.utc_now |> Timex.to_unix,
Expand Down
2 changes: 1 addition & 1 deletion test/builds/builds_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ defmodule AlloyCi.BuildsTest do
"DATABASE_URL" => "postgres://postgres@postgres:5432/alloy_ci_test",
"GITHUB_CLIENT_ID" => "fake-id",
"GITHUB_CLIENT_SECRET" => "fake-secret",
"GITHUB_INTEGRATION_ID" => "1",
"GITHUB_APP_ID" => "1",
"GITHUB_SECRET_TOKEN" => "fake-token",
"MIX_ENV" => "test",
"RUNNER_REGISTRATION_TOKEN" => "lustlmc3gMl59smZ",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/broken_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"GITHUB_SECRET_TOKEN": "fake-token",
"GITHUB_DOMAIN": "github.com",
"SECRET_KEY_BASE": "VfQZ5LWy5OdluDZ60vJjC8Rx8OUjYvswXRpUvuqFcf1qrrj7TtE",
"GITHUB_INTEGRATION_ID": 1,
"GITHUB_APP_ID": 1,
"GITHUB_PRIVATE_KEY": "-----BEGIN RSA PRIVATE KEY-----",
"DATABSE_URL": "postgres",
"REDIS_URL" "redis://redis:6379"
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/full_features_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"GITHUB_CLIENT_SECRET": "fake-secret",
"GITHUB_SECRET_TOKEN": "fake-token",
"SECRET_KEY_BASE": "NULr4xlNDNzEwE77UHdId7cQU+vuaPJ+Q5x3l+7dppQngBsL5EkjEaMu0S9cCGbk",
"GITHUB_INTEGRATION_ID": "1",
"GITHUB_APP_ID": "1",
"DATABASE_URL": "postgres://postgres@postgres:5432/alloy_ci_test"
},
"before_script": [
Expand Down

0 comments on commit 0d37680

Please sign in to comment.