Merge pull request #7591 from ConnorDY/replace-backslash-n-with-newline

Replace `\n` with newline for GitHub App private key to allow storing private key as an environment variable
This commit is contained in:
Fredrik Adelöw
2021-10-14 09:21:35 +02:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/integration': patch
---
By replacing `\n` with a newline for GitHub Apps private keys, this allows users to store the private key as an environment variable and reference it in the YAML.
@@ -74,7 +74,7 @@ class GithubAppManager {
this.baseUrl = baseUrl;
this.baseAuthConfig = {
appId: config.appId,
privateKey: config.privateKey,
privateKey: config.privateKey.replace(/\\n/gm, '\n'),
};
this.appClient = new Octokit({
baseUrl,