diff --git a/src/practices/LanguageIndependent/TimeToSolvePractice.spec.ts b/src/practices/LanguageIndependent/TimeToSolvePullRequestsPractice.spec.ts similarity index 94% rename from src/practices/LanguageIndependent/TimeToSolvePractice.spec.ts rename to src/practices/LanguageIndependent/TimeToSolvePullRequestsPractice.spec.ts index 4fb76bcd3..fb56e6cef 100644 --- a/src/practices/LanguageIndependent/TimeToSolvePractice.spec.ts +++ b/src/practices/LanguageIndependent/TimeToSolvePullRequestsPractice.spec.ts @@ -5,10 +5,10 @@ import { createTestContainer, TestContainerContext } from '../../inversify.confi import { PracticeEvaluationResult } from '../../model'; import { BitbucketPullRequestState } from '../../services'; import { BitbucketNock } from '../../test/helpers/bitbucketNock'; -import { TimeToSolvePractice } from './TimeToSolvePractice'; +import { TimeToSolvePullRequestsPractice } from './TimeToSolvePullRequestsPractice'; -describe('TimeToSolvePractice', () => { - let practice: TimeToSolvePractice; +describe('TimeToSolvePullRequestsPractice', () => { + let practice: TimeToSolvePullRequestsPractice; let containerCtx: TestContainerContext; let bitbucketNock: BitbucketNock; const MockedCollaborationInspector = >(CollaborationInspector); @@ -22,7 +22,7 @@ describe('TimeToSolvePractice', () => { beforeAll(() => { const args = { uri: 'https://bitbucket.org/pypy/pypy' }; containerCtx = createTestContainer(args); - containerCtx.container.bind('TimeToSolvePractice').to(TimeToSolvePractice); + containerCtx.container.bind('TimeToSolvePractice').to(TimeToSolvePullRequestsPractice); practice = containerCtx.container.get('TimeToSolvePractice'); mockCollaborationInspector = new MockedCollaborationInspector(); }); diff --git a/src/practices/LanguageIndependent/TimeToSolvePractice.ts b/src/practices/LanguageIndependent/TimeToSolvePullRequestsPractice.ts similarity index 87% rename from src/practices/LanguageIndependent/TimeToSolvePractice.ts rename to src/practices/LanguageIndependent/TimeToSolvePullRequestsPractice.ts index 9d32af5cd..eb7bb6188 100644 --- a/src/practices/LanguageIndependent/TimeToSolvePractice.ts +++ b/src/practices/LanguageIndependent/TimeToSolvePullRequestsPractice.ts @@ -6,15 +6,15 @@ import { DxPractice } from '../DxPracticeDecorator'; import { IPractice } from '../IPractice'; @DxPractice({ - id: 'LanguageIndependent.TimeToSolve', - name: '', + id: 'LanguageIndependent.TimeToSolvePullRequests', + name: 'Solve Pull Requests Continuously', impact: PracticeImpact.medium, - suggestion: '', + suggestion: 'Do not have an open Pull Request more than 30 days. Review PRs continuously.', reportOnlyOnce: true, url: 'https://dxkb.io/p/pull-requests', dependsOn: { practicing: ['LanguageIndependent.DoesPullRequests'] }, }) -export class TimeToSolvePractice implements IPractice { +export class TimeToSolvePullRequestsPractice implements IPractice { async isApplicable(): Promise { return true; } diff --git a/src/practices/index.ts b/src/practices/index.ts index c02fe5fbf..23177aa15 100644 --- a/src/practices/index.ts +++ b/src/practices/index.ts @@ -23,7 +23,7 @@ import { TsGitignoreCorrectlySetPractice } from './TypeScript/TsGitignoreCorrect import { DoesPullRequestsPractice } from './LanguageIndependent/DoesPullRequests'; import { DependenciesVersionMinorPatchLevel } from './JavaScript/DependenciesVersionMinorPatchLevel'; import { CorrectCommitMessagesPractice } from './LanguageIndependent/CorrectCommitMessagesPractice'; -import { TimeToSolvePractice } from './LanguageIndependent/TimeToSolvePractice'; +import { TimeToSolvePullRequestsPractice } from './LanguageIndependent/TimeToSolvePractice'; // register practices here export const practices = [ @@ -52,5 +52,5 @@ export const practices = [ TsGitignoreCorrectlySetPractice, DoesPullRequestsPractice, CorrectCommitMessagesPractice, - TimeToSolvePractice, + TimeToSolvePullRequestsPractice, ];