@@ -8,12 +8,12 @@ class GithubClient
88 release_tools : {
99 app_id : 857194 ,
1010 installation_id : 69940866 ,
11- private_key_location : ENV . fetch ( 'PYXIS_GH_RELEASE_TOOLS_PRIVATE_KEY' ) ,
11+ private_key : Pyxis :: Environment . github_release_tools_private_key ,
1212 } ,
1313 release_tools_approver : {
1414 app_id : 1373592 ,
1515 installation_id : 70116032 ,
16- private_key_location : ENV . fetch ( 'PYXIS_GH_RELEASE_TOOLS_APPROVER_PRIVATE_KEY' ) ,
16+ private_key : Pyxis :: Environment . github_release_tools_approver_private_key ,
1717 } ,
1818 } . freeze
1919
@@ -33,7 +33,7 @@ def without_auto_pagination(octokit)
3333
3434 def create_installation_access_token ( instance , options = { } )
3535 config = CLIENT_CONFIGS [ instance ]
36- global_client = Octokit ::Client . new ( bearer_token : create_jwt ( config [ :private_key_location ] , config [ :app_id ] ) )
36+ global_client = Octokit ::Client . new ( bearer_token : create_jwt ( config [ :private_key ] , config [ :app_id ] ) )
3737 logger . debug ( 'Created JWT for client' , app : global_client . app . slug )
3838 installation_token = Pyxis ::GlobalStatus . with_faraday_dry_run_bypass do
3939 global_client . create_app_installation_access_token ( config [ :installation_id ] , options )
@@ -54,8 +54,7 @@ def create_octokit(instance)
5454 Octokit ::Client . new ( bearer_token : installation_token [ :token ] )
5555 end
5656
57- def create_jwt ( private_key_path , client_id )
58- private_pem = File . read ( private_key_path )
57+ def create_jwt ( private_pem , client_id )
5958 private_key = OpenSSL ::PKey ::RSA . new ( private_pem )
6059
6160 payload = {
0 commit comments