Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Hosting: Update developer connect model to not use a specifically named oauth connection #8187

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/apphosting/backend.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as clc from "colorette";
import * as poller from "../operation-poller";
import * as apphosting from "../gcp/apphosting";
import * as githubConnections from "./githubConnections";
import * as githubConnections from "./developer-connect/githubConnections";
import { logBullet, logSuccess, logWarning, sleep } from "../utils";
import {
apphostingOrigin,
Expand Down Expand Up @@ -48,7 +48,7 @@
// SSL.
const maybeNodeError = err as { cause: { code: string }; code: string };
if (
/HANDSHAKE_FAILURE/.test(maybeNodeError?.cause?.code) ||

Check warning on line 51 in src/apphosting/backend.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Use `String#includes()` method with a string instead
"EPROTO" === maybeNodeError?.code
) {
return false;
Expand Down Expand Up @@ -263,10 +263,10 @@
async function promptNewBackendId(
projectId: string,
location: string,
prompt: any,

Check warning on line 266 in src/apphosting/backend.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
): Promise<string> {
while (true) {

Check warning on line 268 in src/apphosting/backend.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected constant condition
const backendId = await promptOnce(prompt);

Check warning on line 269 in src/apphosting/backend.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `QuestionsThatReturnAString<Answers>`
try {
await apphosting.getBackend(projectId, location, backendId);
} catch (err: unknown) {
Expand Down Expand Up @@ -443,7 +443,7 @@
let { unreachable, backends } = await apphosting.listBackends(projectId, "-");
if (unreachable && unreachable.length !== 0) {
logWarning(
`The following locations are currently unreachable: ${unreachable}.\n` +

Check warning on line 446 in src/apphosting/backend.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Invalid type "string[]" of template literal expression
"If your backend is in one of these regions, please try again later.",
);
}
Expand All @@ -466,11 +466,11 @@
backends.forEach((backend) =>
backendsByLocation.set(apphosting.parseBackendName(backend.name).location, backend),
);
const location = await promptOnce({

Check warning on line 469 in src/apphosting/backend.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
name: "location",
type: "list",
message: locationDisambugationPrompt,
choices: [...backendsByLocation.keys()],
});
return backendsByLocation.get(location)!;

Check warning on line 475 in src/apphosting/backend.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Forbidden non-null assertion

Check warning on line 475 in src/apphosting/backend.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `string`
}
416 changes: 416 additions & 0 deletions src/apphosting/developer-connect/githubConnections.spec.ts

Large diffs are not rendered by default.

Loading
Loading