mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-04 18:22:10 +00:00
fix: try unescaping newlines? idk (#667)
This commit is contained in:
parent
cc127000ab
commit
33ea6409a6
1 changed files with 3 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import { generateJWT } from "../jwt.js";
|
import { generateJWT } from "../jwt.js";
|
||||||
|
|
||||||
const replaceNewlinesWithBackslashN = (str: string) =>
|
const convertEscapedNewlinesToNewlines = (str: string) =>
|
||||||
str.replace(/\n/g, "\\n");
|
str.replace(/\\n/g, "\n");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an installation access token for a GitHub App installation
|
* Gets an installation access token for a GitHub App installation
|
||||||
|
|
@ -13,7 +13,7 @@ export async function getInstallationToken(
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const jwtToken = generateJWT(
|
const jwtToken = generateJWT(
|
||||||
appId,
|
appId,
|
||||||
replaceNewlinesWithBackslashN(privateKey),
|
convertEscapedNewlinesToNewlines(privateKey),
|
||||||
);
|
);
|
||||||
|
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue