Read private key as byte array

This commit is contained in:
Sebastian Cabrera 2023-08-28 21:56:23 -04:00
parent b28529ca80
commit 77b8be9968

View file

@ -14,7 +14,7 @@ import (
// Wrap the shared transport for use with the integration ID and authenticating with installation ID.
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.
var client = github.NewClient(&http.Client{Transport: itr})