Skip to content

Commit

Permalink
fix: Avoiding the creation of multiple output directories (#1171)
Browse files Browse the repository at this point in the history
* Using iocTypes to avoid creating multiple instances of ADOTaskConfig

* Fixing format issues

Co-authored-by: Tania Martinez Villagomez <[email protected]>
  • Loading branch information
ThanyaLeif and Tania Martinez Villagomez authored May 4, 2022
1 parent 9c21814 commit 7c86844
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/ado-extension/src/ado-artifacts-info-provider.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { ArtifactsInfoProvider } from '@accessibility-insights-action/shared';
import { ArtifactsInfoProvider, iocTypes } from '@accessibility-insights-action/shared';
import { inject, injectable } from 'inversify';

import { ADOTaskConfig } from './task-config/ado-task-config';

@injectable()
export class ADOArtifactsInfoProvider extends ArtifactsInfoProvider {
constructor(@inject(ADOTaskConfig) private readonly adoTaskConfig: ADOTaskConfig) {
constructor(@inject(iocTypes.TaskConfig) private readonly adoTaskConfig: ADOTaskConfig) {
super();
}
public getArtifactsUrl(): string | undefined {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { ADOTaskConfig } from '../../task-config/ado-task-config';
import { inject, injectable } from 'inversify';
import { Logger, ReportConsoleLogConvertor } from '@accessibility-insights-action/shared';
import { iocTypes, Logger, ReportConsoleLogConvertor } from '@accessibility-insights-action/shared';
import * as fs from 'fs';
import * as path from 'path';
import { ReportMarkdownConvertor } from '@accessibility-insights-action/shared';
Expand All @@ -15,7 +15,7 @@ import { BaselineInfo } from '@accessibility-insights-action/shared';
@injectable()
export class AdoConsoleCommentCreator extends ProgressReporter {
constructor(
@inject(ADOTaskConfig) private readonly taskConfig: ADOTaskConfig,
@inject(iocTypes.TaskConfig) private readonly taskConfig: ADOTaskConfig,
@inject(ReportMarkdownConvertor) private readonly reportMarkdownConvertor: ReportMarkdownConvertor,
@inject(ReportConsoleLogConvertor) private readonly reportConsoleLogConvertor: ReportConsoleLogConvertor,
@inject(Logger) private readonly logger: Logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@

import { ADOTaskConfig } from '../../task-config/ado-task-config';
import { inject, injectable } from 'inversify';
import { Logger, ProgressReporter } from '@accessibility-insights-action/shared';
import { iocTypes, Logger, ProgressReporter } from '@accessibility-insights-action/shared';
import { CombinedReportParameters } from 'accessibility-insights-report';
import { BaselineEvaluation } from 'accessibility-insights-scan';

@injectable()
export class WorkflowEnforcer extends ProgressReporter {
private scanSucceeded = true;

constructor(@inject(ADOTaskConfig) private readonly adoTaskConfig: ADOTaskConfig, @inject(Logger) private readonly logger: Logger) {
constructor(
@inject(iocTypes.TaskConfig) private readonly adoTaskConfig: ADOTaskConfig,
@inject(Logger) private readonly logger: Logger,
) {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { BaselineEvaluation } from 'accessibility-insights-scan';
@injectable()
export class TelemetrySender extends ProgressReporter {
constructor(
@inject(ADOTaskConfig) private readonly adoTaskConfig: ADOTaskConfig,
@inject(iocTypes.TaskConfig) private readonly adoTaskConfig: ADOTaskConfig,
@inject(iocTypes.TelemetryClient) private readonly telemetryClient: TelemetryClient,
) {
super();
Expand Down

0 comments on commit 7c86844

Please sign in to comment.