Skip to content

Commit

Permalink
fix: remove botched newlines from github actions secret for fern-bot (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
armandobelardo authored May 7, 2024
1 parent 3fe6dbb commit aacf677
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion servers/fern-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"lint": "eslint --max-warnings 0 src --ext .ts",
"format": "prettier --write --ignore-unknown --ignore-path ../../shared/.prettierignore \"**\"",
"lint:fix": "pnpm lint --fix",
"proxy": "smee -u https://smee.io/3DXoSvCO2NH87w8e"
"proxy": "smee -u https://smee.io/3DXoSvCO2NH87w8e",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../.eslintignore",
"lint:eslint:fix": "pnpm lint:eslint --fix"
},
"engines": {
"node": ">=14.15.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async function updateOpenApiSpecInternal(octokit: Octokit, repository: Repositor
await mkdir(fullRepoPath, { recursive: true });
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const installationToken = ((await octokit.auth({ type: "installation" })) as any).token;
const git = simpleGit(fullRepoPath);

Expand All @@ -35,7 +36,7 @@ async function updateOpenApiSpecInternal(octokit: Octokit, repository: Repositor
try {
// If you can fetch the branch, checkout the branch
await git.fetch(branchRemoteName, OPENAPI_UPDATE_BRANCH);
console.log(`Branch exists, checking out`);
console.log("Branch exists, checking out");
await git.checkout(OPENAPI_UPDATE_BRANCH);
// Merge the default branch into this branch to update it
// prefer the default branch changes
Expand All @@ -45,7 +46,7 @@ async function updateOpenApiSpecInternal(octokit: Octokit, repository: Repositor
// to the same branch that are not OpenAPI related, that we'd lose if we deleted and reupdated the spec.
await git.merge(["-X", "theirs", originDefaultBranch]);
} catch (e) {
console.log(`Branch does not exist, create and checkout`);
console.log("Branch does not exist, create and checkout");
await git.checkoutBranch(OPENAPI_UPDATE_BRANCH, branchRemoteName);
}

Expand Down
2 changes: 1 addition & 1 deletion servers/fern-bot/src/libs/cohere.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export async function generateChangelog(diff: string): Promise<string> {
}
-}
+}
\ No newline at end of file
\\ No newline at end of file
\`\`\`
Changelog:
## Summary
Expand Down
2 changes: 1 addition & 1 deletion servers/fern-bot/src/libs/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function evaluateEnv(): Env {
const repoToRunOn = process?.env.REPO_TO_RUN_ON;
return {
GITHUB_APP_ID: process?.env.GITHUB_APP_ID,
GITHUB_APP_PRIVATE_KEY: process?.env.GITHUB_APP_PRIVATE_KEY,
GITHUB_APP_PRIVATE_KEY: process?.env.GITHUB_APP_PRIVATE_KEY?.replaceAll("\\n", "\n"),
GITHUB_APP_CLIENT_ID: process?.env.GITHUB_APP_CLIENT_ID,
GITHUB_APP_CLIENT_SECRET: process?.env.GITHUB_APP_CLIENT_SECRET,
GITHUB_APP_WEBHOOK_SECRET: process?.env.GITHUB_APP_WEBHOOK_SECRET,
Expand Down
3 changes: 0 additions & 3 deletions servers/fern-bot/src/libs/handler-resolver.ts

This file was deleted.

1 change: 1 addition & 0 deletions servers/fern-bot/src/libs/handler-wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import type { APIGatewayProxyEvent, APIGatewayProxyResult, Context } from "aws-lambda";

export const handlerWrapper =
Expand Down

0 comments on commit aacf677

Please sign in to comment.