Sonia-corporation/stale

View on GitHub

Showing 174 of 251 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class PullRequestIncludeProcessor extends AbstractIncludeProcessor<PullRequestProcessor> {
  public constructor(pullRequestProcessor: PullRequestProcessor) {
    super(pullRequestProcessor);
  }

src/core/processing/issues/issue-include-processor.ts on lines 20..373

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2943.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class IssueIncludeProcessor extends AbstractIncludeProcessor<IssueProcessor> {
  public constructor(issueProcessor: IssueProcessor) {
    super(issueProcessor);
  }

Severity: Major
Found in src/core/processing/issues/issue-include-processor.ts and 1 other location - About 2 wks to fix
src/core/processing/pull-requests/pull-request-include-processor.ts on lines 20..380

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 2943.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class PullRequestRemoveStaleProcessor extends AbstractRemoveStaleProcessor<PullRequestProcessor> {
  public readonly githubApiPullRequestTimelineItemsService$$: GithubApiPullRequestTimelineItemsService;
  public readonly githubApiPullRequestLabelsService$$: GithubApiPullRequestLabelsService;

  public constructor(pullRequestProcessor: PullRequestProcessor) {
src/core/processing/issues/issue-remove-stale-processor.ts on lines 26..174

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 1369.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class IssueRemoveStaleProcessor extends AbstractRemoveStaleProcessor<IssueProcessor> {
  public readonly githubApiIssueTimelineItemsService$$: GithubApiIssueTimelineItemsService;
  public readonly githubApiIssueLabelsService$$: GithubApiIssueLabelsService;

  public constructor(issueProcessor: IssueProcessor) {
Severity: Major
Found in src/core/processing/issues/issue-remove-stale-processor.ts and 1 other location - About 1 wk to fix
src/core/processing/pull-requests/pull-request-remove-stale-processor.ts on lines 26..185

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 1369.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class IssuesService extends AbstractProcessingService<IGithubApiGetIssues> {
  private static _instance: IssuesService;

  public static getInstance(): IssuesService {
    if (_.isNil(IssuesService._instance)) {
Severity: Major
Found in src/core/processing/issues/issues.service.ts and 1 other location - About 3 days to fix
src/core/processing/pull-requests/pull-requests.service.ts on lines 15..91

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 538.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class PullRequestsService extends AbstractProcessingService<IGithubApiGetPullRequests> {
  private static _instance: PullRequestsService;

  public static getInstance(): PullRequestsService {
    if (_.isNil(PullRequestsService._instance)) {
Severity: Major
Found in src/core/processing/pull-requests/pull-requests.service.ts and 1 other location - About 3 days to fix
src/core/processing/issues/issues.service.ts on lines 15..87

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 538.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  public async processToRemoveExtraLabels$$(): Promise<void> {
    this.processor.logger.info(`Checking if more labels should be removed...`);

    const labelsToRemove: string[] = this._getExtraLabelsToRemoveName();

Severity: Major
Found in src/core/processing/abstract-extra-labels-processor.ts and 3 other locations - About 2 days to fix
src/core/processing/abstract-extra-labels-processor.ts on lines 21..59
src/core/processing/abstract-stale-processor.ts on lines 117..155
src/core/processing/abstract-stale-processor.ts on lines 157..195

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 510.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  public async processToAddExtraLabels$$(): Promise<void> {
    this.processor.logger.info(`Checking if more labels should be added...`);

    const labelsToAdd: string[] = this._getExtraLabelsToAddName();

Severity: Major
Found in src/core/processing/abstract-extra-labels-processor.ts and 3 other locations - About 2 days to fix
src/core/processing/abstract-extra-labels-processor.ts on lines 61..99
src/core/processing/abstract-stale-processor.ts on lines 117..155
src/core/processing/abstract-stale-processor.ts on lines 157..195

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 510.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  public async processToRemoveExtraLabels$$(): Promise<void> {
    this.processor.logger.info(`Checking if more labels should be removed...`);

    const labelsToRemove: string[] = this._getExtraLabelsToRemoveName();

Severity: Major
Found in src/core/processing/abstract-stale-processor.ts and 3 other locations - About 2 days to fix
src/core/processing/abstract-extra-labels-processor.ts on lines 21..59
src/core/processing/abstract-extra-labels-processor.ts on lines 61..99
src/core/processing/abstract-stale-processor.ts on lines 117..155

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 510.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

  public async processToAddExtraLabels$$(): Promise<void> {
    this.processor.logger.info(`Checking if more labels should be added...`);

    const labelsToAdd: string[] = this._getExtraLabelsToAddName();

Severity: Major
Found in src/core/processing/abstract-stale-processor.ts and 3 other locations - About 2 days to fix
src/core/processing/abstract-extra-labels-processor.ts on lines 21..59
src/core/processing/abstract-extra-labels-processor.ts on lines 61..99
src/core/processing/abstract-stale-processor.ts on lines 157..195

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 510.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  public hasAnyIgnoredAssignees$$(): boolean {
    this.processor.logger.info(`Checking if this pull request has one of the ignored assignees...`);

    const pullRequestsInputs: IPullRequestsInputs = PullRequestsInputsService.getInstance().getInputs();
    const duplicatedAssignees: string[] = getDuplicates(
src/core/processing/issues/issue-ignore-processor.ts on lines 175..220
src/core/processing/issues/issue-ignore-processor.ts on lines 222..267
src/core/processing/issues/issue-ignore-processor.ts on lines 269..314
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 181..226
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 275..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 414.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  public hasAnyIgnoredAssignees$$(): boolean {
    this.processor.logger.info(`Checking if this issue has one of the ignored assignees...`);

    const issuesInputs: IIssuesInputs = IssuesInputsService.getInstance().getInputs();
    const duplicatedAssignees: string[] = getDuplicates(
Severity: Major
Found in src/core/processing/issues/issue-ignore-processor.ts and 5 other locations - About 2 days to fix
src/core/processing/issues/issue-ignore-processor.ts on lines 175..220
src/core/processing/issues/issue-ignore-processor.ts on lines 269..314
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 181..226
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 228..273
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 275..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 414.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  public hasAnyIgnoredProjectCards$$(): boolean {
    this.processor.logger.info(`Checking if this issue has one of the ignored project cards...`);

    const issuesInputs: IIssuesInputs = IssuesInputsService.getInstance().getInputs();
    const duplicatedProjectCards: string[] = getDuplicates(
Severity: Major
Found in src/core/processing/issues/issue-ignore-processor.ts and 5 other locations - About 2 days to fix
src/core/processing/issues/issue-ignore-processor.ts on lines 175..220
src/core/processing/issues/issue-ignore-processor.ts on lines 222..267
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 181..226
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 228..273
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 275..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 414.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  public hasAnyIgnoredLabels$$(): boolean {
    this.processor.logger.info(`Checking if this pull request has one of the ignored labels...`);

    const pullRequestsInputs: IPullRequestsInputs = PullRequestsInputsService.getInstance().getInputs();
    const duplicatedLabels: string[] = getDuplicates(
src/core/processing/issues/issue-ignore-processor.ts on lines 175..220
src/core/processing/issues/issue-ignore-processor.ts on lines 222..267
src/core/processing/issues/issue-ignore-processor.ts on lines 269..314
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 228..273
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 275..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 414.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  public hasAnyIgnoredLabels$$(): boolean {
    this.processor.logger.info(`Checking if this issue has one of the ignored labels...`);

    const issuesInputs: IIssuesInputs = IssuesInputsService.getInstance().getInputs();
    const duplicatedLabels: string[] = getDuplicates(
Severity: Major
Found in src/core/processing/issues/issue-ignore-processor.ts and 5 other locations - About 2 days to fix
src/core/processing/issues/issue-ignore-processor.ts on lines 222..267
src/core/processing/issues/issue-ignore-processor.ts on lines 269..314
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 181..226
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 228..273
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 275..320

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 414.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

  public hasAnyIgnoredProjectCards$$(): boolean {
    this.processor.logger.info(`Checking if this pull request has one of the ignored project cards...`);

    const pullRequestsInputs: IPullRequestsInputs = PullRequestsInputsService.getInstance().getInputs();
    const duplicatedProjectCards: string[] = getDuplicates(
src/core/processing/issues/issue-ignore-processor.ts on lines 175..220
src/core/processing/issues/issue-ignore-processor.ts on lines 222..267
src/core/processing/issues/issue-ignore-processor.ts on lines 269..314
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 181..226
src/core/processing/pull-requests/pull-request-ignore-processor.ts on lines 228..273

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 414.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  public addLabels(targetId: Readonly<IUuid>, labelsId: ReadonlyArray<IUuid>): Promise<void> | never {
    this.processor.logger.info(
      `Adding the labels`,
      LoggerService.value(labelsId),
      LoggerFormatService.whiteBright(`on the ${this.type}`),
Severity: Major
Found in src/github/api/labels/abstract-github-api-labels.service.ts and 4 other locations - About 2 days to fix
src/github/api/comments/abstract-github-api-comments.service.ts on lines 20..57
src/github/api/labels/abstract-github-api-labels.service.ts on lines 134..171
src/github/api/labels/abstract-github-api-labels.service.ts on lines 212..249
src/github/api/labels/abstract-github-api-labels.service.ts on lines 251..288

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 409.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  public addLabel(targetId: Readonly<IUuid>, labelId: Readonly<IUuid>): Promise<void> | never {
    this.processor.logger.info(
      `Adding the label`,
      LoggerService.value(labelId),
      LoggerFormatService.whiteBright(`on the ${this.type}`),
Severity: Major
Found in src/github/api/labels/abstract-github-api-labels.service.ts and 4 other locations - About 2 days to fix
src/github/api/comments/abstract-github-api-comments.service.ts on lines 20..57
src/github/api/labels/abstract-github-api-labels.service.ts on lines 173..210
src/github/api/labels/abstract-github-api-labels.service.ts on lines 212..249
src/github/api/labels/abstract-github-api-labels.service.ts on lines 251..288

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 409.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  public addComment(targetId: Readonly<IUuid>, comment: Readonly<IComment>): Promise<void> | never {
    this.processor.logger.info(
      `Adding the comment`,
      LoggerService.value(comment),
      LoggerFormatService.whiteBright(`on the ${this.type}`),
src/github/api/labels/abstract-github-api-labels.service.ts on lines 134..171
src/github/api/labels/abstract-github-api-labels.service.ts on lines 173..210
src/github/api/labels/abstract-github-api-labels.service.ts on lines 212..249
src/github/api/labels/abstract-github-api-labels.service.ts on lines 251..288

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 409.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

  public removeLabel(targetId: Readonly<IUuid>, labelId: Readonly<IUuid>): Promise<void> | never {
    this.processor.logger.info(
      `Removing the label`,
      LoggerService.value(labelId),
      LoggerFormatService.whiteBright(`from the ${this.type}`),
Severity: Major
Found in src/github/api/labels/abstract-github-api-labels.service.ts and 4 other locations - About 2 days to fix
src/github/api/comments/abstract-github-api-comments.service.ts on lines 20..57
src/github/api/labels/abstract-github-api-labels.service.ts on lines 134..171
src/github/api/labels/abstract-github-api-labels.service.ts on lines 173..210
src/github/api/labels/abstract-github-api-labels.service.ts on lines 251..288

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 409.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language