Skip to content

Commit

Permalink
:adhensive_bandage: 改行文字の置き換え
Browse files Browse the repository at this point in the history
  • Loading branch information
ikura-hamu committed Aug 22, 2024
1 parent 45971e0 commit 8d249ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service/impl/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"os"
"strconv"
"strings"

"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/google/go-github/v63/github"
Expand Down Expand Up @@ -39,6 +40,8 @@ func NewGitHub(orgName string) (*GitHub, error) {
return nil, errors.New("GITHUB_PRIVATE_KEY is not set")
}

privateKeyStr = strings.ReplaceAll(privateKeyStr, "\\n", "\n")

irt, err := ghinstallation.New(http.DefaultTransport, gitHubAppID, gitHubAppInstallationID, []byte(privateKeyStr))
if err != nil {
return nil, fmt.Errorf("failed to create GitHub installation round tripper: %w", err)
Expand Down

0 comments on commit 8d249ed

Please sign in to comment.