diff --git a/api/controllers/v1/slack.ts b/api/controllers/v1/slack.ts index 0be7fa394..fa23790a7 100644 --- a/api/controllers/v1/slack.ts +++ b/api/controllers/v1/slack.ts @@ -16,7 +16,7 @@ import { import { DocsetsRepository } from '../../../src/repositories/docsetsRepository'; import { Payload } from '../../../src/entities/job'; import { ProjectsRepository } from '../../../src/repositories/projectsRepository'; -import DOCS_METADATA from '../../../src/constants'; +import { DOCS_METADATA } from '../../../src/constants'; export const DisplayRepoOptions = async (event: APIGatewayEvent): Promise => { const consoleLogger = new ConsoleLogger(); @@ -80,6 +80,7 @@ export const DisplayRepoOptions = async (event: APIGatewayEvent): Promise, logger: ILogger, jobRepository: JobRepository, jobQueueUrl) { try { await jobRepository.insertBulkJobs(deployable, jobQueueUrl); + console.error('testing console error logging'); } catch (err) { console.error('Deploy repo error'); } @@ -150,7 +151,7 @@ export const getDeployableJobs = async ( directory ); - if (!aliases || aliases.length) { + if (!aliases || !aliases.length) { if (non_versioned) { newPayload.urlSlug = ''; } diff --git a/src/constants.ts b/src/constants.ts index f6d0f9f52..71722428a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,3 +1 @@ -const DOCS_METADATA = 'docs_metadata'; - -export default DOCS_METADATA; +export const DOCS_METADATA = 'docs_metadata'; diff --git a/src/services/slack.ts b/src/services/slack.ts index 787ba4642..972608e0e 100644 --- a/src/services/slack.ts +++ b/src/services/slack.ts @@ -72,8 +72,8 @@ export class SlackConnector implements ISlackConnector { values['repo_option'] = []; for (const group of optionGroups) { values['repo_option'].push( - ...group.options.map((option) => { - if (!option.text.text.startsWith('(!inactive)')) return option; + ...group.options.filter((option) => { + !option.text.text.startsWith('(!inactive)'); }) ); }