commit
0577dd4be6
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
// Wrap the shared transport for use with the integration ID and authenticating with installation ID.
|
// Wrap the shared transport for use with the integration ID and authenticating with installation ID.
|
||||||
var privateKey = os.Getenv("privateKey")
|
var privateKey = os.Getenv("privateKey")
|
||||||
var itr, _ = ghinstallation.NewKeyFromFile(http.DefaultTransport, 381312, 41105280, privateKey)
|
var itr, _ = ghinstallation.New(http.DefaultTransport, 381312, 41105280, []byte(privateKey))
|
||||||
|
|
||||||
// Use installation transport with client.
|
// Use installation transport with client.
|
||||||
var client = github.NewClient(&http.Client{Transport: itr})
|
var client = github.NewClient(&http.Client{Transport: itr})
|
||||||
|
@ -24,7 +24,7 @@ func initGitHubClient() {
|
||||||
log.Println("Initializing......")
|
log.Println("Initializing......")
|
||||||
|
|
||||||
if privateKey != "" {
|
if privateKey != "" {
|
||||||
log.Println(privateKey)
|
log.Println("Private key loaded from env!")
|
||||||
} else {
|
} else {
|
||||||
log.Println("Private key not found!")
|
log.Println("Private key not found!")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue