From 5eec23f21d8ac2bb072cb73a33b3e6e35f95ab85 Mon Sep 17 00:00:00 2001 From: anabellabuckvar <41971124+anabellabuckvar@users.noreply.github.com> Date: Mon, 13 May 2024 15:38:47 -0400 Subject: [PATCH] DOP-4599 push to preprd and remove extraneous param --- api/controllers/v1/slack.ts | 2 +- src/services/slack.ts | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/api/controllers/v1/slack.ts b/api/controllers/v1/slack.ts index 88ee74518..6d852c298 100644 --- a/api/controllers/v1/slack.ts +++ b/api/controllers/v1/slack.ts @@ -227,7 +227,7 @@ export const DeployRepo = async (event: any = {}): Promise => { const isAdmin = await repoEntitlementRepository.getIsAdmin(parsed.user.id); const optionGroups = parsed.view.blocks[0]?.element?.option_groups; try { - values = await slackConnector.parseSelection(stateValues, isAdmin, repoBranchesRepository, optionGroups); + values = await slackConnector.parseSelection(stateValues, isAdmin, optionGroups); } catch (e) { console.log(`Error parsing selection: ${e}`); return prepResponse(401, 'text/plain', e); diff --git a/src/services/slack.ts b/src/services/slack.ts index 6c77c55a2..70179bc81 100644 --- a/src/services/slack.ts +++ b/src/services/slack.ts @@ -2,7 +2,6 @@ import axios from 'axios'; import { ILogger } from './logger'; import { IConfig } from 'config'; import * as crypto from 'crypto'; -import { RepoBranchesRepository } from '../repositories/repoBranchesRepository'; export const axiosApi = axios.create(); function bufferEqual(a: Buffer, b: Buffer) { @@ -24,12 +23,7 @@ function timeSafeCompare(a: string, b: string) { export interface ISlackConnector { validateSlackRequest(payload: any): boolean; displayRepoOptions(repos: Array, triggerId: string, isAdmin: boolean): Promise; - parseSelection( - payload: any, - isAdmin: boolean, - repoBranchesRepository: RepoBranchesRepository, - optionGroups: any[] - ): any; + parseSelection(payload: any, isAdmin: boolean, optionGroups: any[]): any; sendMessage(message: any, user: string): Promise; } @@ -59,12 +53,7 @@ export class SlackConnector implements ISlackConnector { return {}; } - async parseSelection( - stateValues: any, - isAdmin: boolean, - repoBranchesRepository: RepoBranchesRepository, - optionGroups: any[] - ): Promise { + async parseSelection(stateValues: any, isAdmin: boolean, optionGroups: any[]): Promise { const values = {}; const inputMapping = { block_repo_option: 'repo_option',