Skip to content

Commit

Permalink
[DOP-4294]: Add new graphql query
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry committed Jan 22, 2024
1 parent e9a6cdf commit 9ac299e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/rebuild-parse-cache/src/get-repos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { MongoClient } from 'mongodb';
import * as core from '@actions/core';
import * as github from '@actions/github';

async function getParameters(env: string): Promise<unknown> {
async function getParameters(env: string): Promise<Record<string, string>> {
const parameters = [''];
const ssmPrefix = `/env/${env}/docs/worker_pool`;
const ssmClient = new SSMClient({ region: process.env.CDK_DEFAULT_REGION });
Expand Down Expand Up @@ -42,8 +42,15 @@ async function getParameters(env: string): Promise<unknown> {
return parametersMap;
}

async function getMongoClient(): Promise<void> {
const client = new MongoClient('');
async function getMongoClient({
MONGO_ATLAS_PASSWORD,
MONGO_ATLAS_USERNAME,
MONGO_ATLAS_HOST,
}: Record<string, string>): Promise<void> {
const atlasUrl = `mongodb+srv://${MONGO_ATLAS_USERNAME}:${MONGO_ATLAS_PASSWORD}@${MONGO_ATLAS_HOST}/admin?retryWrites=true`;
const client = new MongoClient(atlasUrl);

await client.connect();
}

/**
Expand Down

0 comments on commit 9ac299e

Please sign in to comment.