Skip to content

Commit

Permalink
[#72] Remove unused code from catcher models (#146)
Browse files Browse the repository at this point in the history
As WATcher is ported from CATcher, there are a lot of models and methods
that are not used and are unrelated to WATcher.

Let's remove most of the unused code in core/models
  • Loading branch information
Eclipse-Dominator authored Jul 16, 2023
1 parent 95e36a6 commit adf0ae4
Show file tree
Hide file tree
Showing 55 changed files with 29 additions and 1,924 deletions.
9 changes: 0 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,14 @@
"@octokit/rest": "^16.37.0",
"@primer/octicons": "^17.12.0",
"@types/geojson": "7946.0.8",
"ajv": "^6.11.0",
"apollo-angular": "^1.9.1",
"apollo-angular-link-http": "^1.10.0",
"apollo-cache-inmemory": "^1.6.0",
"apollo-client": "^2.6.0",
"apollo-link": "^1.2.14",
"apollo-link-context": "^1.0.20",
"arcsecond": "^4.1.0",
"core-js": "^3.28.0",
"d3": "^7.4.4",
"d3-time": "^3.0.0",
"d3-time-format": "^4.1.0",
"d3-timelines": "^1.3.1",
"diff-match-patch": "^1.0.4",
"dompurify": "^2.4.4",
"graphql": "^14.6.0",
"graphql-tag": "2.11.0",
"karma-spec-reporter": "0.0.32",
Expand All @@ -78,8 +71,6 @@
"@graphql-codegen/typescript-operations": "^1.18.4",
"@graphql-codegen/typescript-resolvers": "^1.20.0",
"@octokit/graphql-schema": "^8.24.0",
"@types/d3": "^7.4.0",
"@types/dompurify": "^2.3.1",
"@types/jasmine": "^3.8.2",
"@types/jasminewd2": "2.0.8",
"@types/node": "^14.17.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@
<form [formGroup]="repoForm" (ngSubmit)="setupSession()">
<mat-card-content>
<mat-form-field class="login-field">
<input
matInput
placeholder="Repository Location (Org/Repo)"
formControlName="repo"
required
[matAutocomplete]="auto"/>
<input matInput placeholder="Repository Location (Org/Repo)" formControlName="repo" required [matAutocomplete]="auto" />
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let suggestion of filteredSuggestions | async" [value]="suggestion">
{{suggestion}}
{{ suggestion }}
</mat-option>
</mat-autocomplete>
</mat-form-field>
Expand Down
9 changes: 4 additions & 5 deletions src/app/auth/session-selection/session-selection.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,10 @@ export class SessionSelectionComponent implements OnInit {
});
this.suggestions = JSON.parse(window.localStorage.getItem('suggestions')) || [];
// Ref: https://v10.material.angular.io/components/autocomplete/overview
this.filteredSuggestions = this.repoForm.get('repo').valueChanges
.pipe(
startWith(''),
map(value => this.suggestions.filter(suggestion => suggestion.toLowerCase().includes(value.toLowerCase())))
);
this.filteredSuggestions = this.repoForm.get('repo').valueChanges.pipe(
startWith(''),
map((value) => this.suggestions.filter((suggestion) => suggestion.toLowerCase().includes(value.toLowerCase())))
);
}

private autofillRepo() {
Expand Down
16 changes: 0 additions & 16 deletions src/app/core/models/assignee.model.ts

This file was deleted.

17 changes: 0 additions & 17 deletions src/app/core/models/checkbox.model.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/app/core/models/conflict/addition.model.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/core/models/conflict/changes.model.ts

This file was deleted.

45 changes: 0 additions & 45 deletions src/app/core/models/conflict/conflict.model.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/app/core/models/conflict/no-change.model.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/app/core/models/conflict/removal.model.ts

This file was deleted.

29 changes: 0 additions & 29 deletions src/app/core/models/generators/github-issue.generator.ts

This file was deleted.

4 changes: 0 additions & 4 deletions src/app/core/models/github/github-issue.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,4 @@ export class GithubIssue {
}
}
}

findTeamId(): string {
return `${this.findLabel('team')}.${this.findLabel('tutorial')}`;
}
}
58 changes: 0 additions & 58 deletions src/app/core/models/issue-dispute.model.ts

This file was deleted.

Loading

0 comments on commit adf0ae4

Please sign in to comment.