Skip to content

Commit

Permalink
Remove GitHub App ID configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed May 2, 2024
1 parent 17ee6f4 commit 42863f2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ jobs:
DOMAIN: ${{ secrets.DOMAIN }}
PUBLIC_IP: ${{ secrets.PUBLIC_IP }}
ORKA_BASE_URL: ${{ secrets.ORKA_BASE_URL }}
GITHUB_APP_ID: ${{ secrets.GITHUBAPP_ID }}
GITHUB_CLIENT_ID: ${{ secrets.GITHUBCLIENT_ID }}
GITHUB_ORGANISATION: ${{ github.repository_owner }}
GITHUB_INSTALLATION_ID: ${{ secrets.GITHUBAPP_INSTALLATION_ID }}
Expand All @@ -94,7 +93,6 @@ jobs:
s|@DOMAIN@|$DOMAIN|g
s|@PUBLIC_IP@|$PUBLIC_IP|g
s|@ORKA_BASE_URL@|$ORKA_BASE_URL|g
s|@GITHUB_APP_ID@|$GITHUB_APP_ID|g
s|@GITHUB_CLIENT_ID@|$GITHUB_CLIENT_ID|g
s|@GITHUB_ORGANISATION@|$GITHUB_ORGANISATION|g
s|@GITHUB_INSTALLATION_ID@|$GITHUB_INSTALLATION_ID|g
Expand Down
1 change: 0 additions & 1 deletion deployment/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ metadata:
data:
PUBLIC_IP: "@PUBLIC_IP@"
ORKA_BASE_URL: "@ORKA_BASE_URL@"
GITHUB_APP_ID: "@GITHUB_APP_ID@"
GITHUB_CLIENT_ID: "@GITHUB_CLIENT_ID@"
GITHUB_ORGANISATION: "@GITHUB_ORGANISATION@"
GITHUB_INSTALLATION_ID: "@GITHUB_INSTALLATION_ID@"
Expand Down
5 changes: 2 additions & 3 deletions src/shared_state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SharedState
class Config
attr_reader :state_file,
:orka_base_url, :orka_token,
:github_app_id, :github_app_private_key,
:github_app_private_key,
:github_client_id, :github_client_secret,
:github_webhook_secret,
:github_organisation, :github_installation_id,
Expand All @@ -41,7 +41,6 @@ def initialize
@state_file = ENV.fetch("STATE_FILE")
@orka_base_url = ENV.fetch("ORKA_BASE_URL")
@orka_token = ENV.fetch("ORKA_TOKEN")
@github_app_id = ENV.fetch("GITHUB_APP_ID")
@github_app_private_key = OpenSSL::PKey::RSA.new(Base64.strict_decode64(ENV.fetch("GITHUB_APP_PRIVATE_KEY")))
@github_client_id = ENV.fetch("GITHUB_CLIENT_ID")
@github_client_secret = ENV.fetch("GITHUB_CLIENT_SECRET")
Expand Down Expand Up @@ -185,7 +184,7 @@ def jwt_github_client
payload = {
iat: Time.now.to_i - 60,
exp: Time.now.to_i + (9 * 60), # 10 is the max, but let's be safe with 9.
iss: @config.github_app_id,
iss: @config.github_client_id,
}
token = JWT.encode(payload, @config.github_app_private_key, "RS256")

Expand Down

0 comments on commit 42863f2

Please sign in to comment.