Skip to content

Commit

Permalink
Resolve conflicts, fix no labels, add SimpleLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
chia-yh committed Jul 24, 2023
2 parents abbe68c + cbf8c82 commit 3c3966b
Show file tree
Hide file tree
Showing 71 changed files with 367 additions and 2,782 deletions.
14 changes: 2 additions & 12 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,8 @@
"src/favicon.256x256.png",
"src/favicon.512x512.png"
],
"styles": [
"node_modules/prismjs/themes/prism-okaidia.css",
"src/styles.css",
"src/markdown.css",
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css"
],
"scripts": [
"node_modules/marked/lib/marked.js",
"node_modules/prismjs/prism.js",
"node_modules/prismjs/components/prism-csharp.min.js",
"node_modules/prismjs/components/prism-css.min.js"
]
"styles": ["src/styles.css", "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css"],
"scripts": []
},
"configurations": {
"staging": {
Expand Down
10 changes: 0 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,18 @@
"@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",
"moment": "^2.24.0",
"ngx-markdown": "^10.1.1",
"ngx-mat-select-search": "^3.3.3",
"node-fetch": "^2.6.9",
"rxjs": "6.5.5",
Expand All @@ -79,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
8 changes: 0 additions & 8 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { HttpLink, HttpLinkModule } from 'apollo-angular-link-http';
import { InMemoryCache, IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
import { ApolloLink } from 'apollo-link';
import { setContext } from 'apollo-link-context';
import { MarkdownModule, MarkedOptions } from 'ngx-markdown';
import 'reflect-metadata';
import graphqlTypes from '../../graphql/graphql-types';
import '../polyfills';
Expand All @@ -33,7 +32,6 @@ import { UserService } from './core/services/user.service';
import { IssuesViewerModule } from './issues-viewer/issues-viewer.module';
import { LabelDefinitionPopupComponent } from './shared/label-definition-popup/label-definition-popup.component';
import { HeaderComponent } from './shared/layout';
import { markedOptionsFactory } from './shared/lib/marked';
import { RepoChangeFormComponent } from './shared/repo-change-form/repo-change-form.component';
import { SharedModule } from './shared/shared.module';

Expand All @@ -54,12 +52,6 @@ import { SharedModule } from './shared/shared.module';
ActivityDashboardModule,
SharedModule,
HttpClientModule,
MarkdownModule.forRoot({
markedOptions: {
provide: MarkedOptions,
useFactory: markedOptionsFactory
}
}),
AppRoutingModule,
ApolloModule,
HttpLinkModule
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
19 changes: 5 additions & 14 deletions src/app/auth/session-selection/session-selection.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Observable } from 'rxjs';
import { map, startWith } from 'rxjs/operators';
import { Profile } from '../../core/models/profile.model';
import { AuthService, AuthState } from '../../core/services/auth.service';
import { ErrorHandlingService } from '../../core/services/error-handling.service';
import { LoggingService } from '../../core/services/logging.service';
import { RepoUrlCacheService } from '../../core/services/repo-url-cache.service';

@Component({
selector: 'app-session-selection',
Expand All @@ -17,7 +17,6 @@ export class SessionSelectionComponent implements OnInit {
isSettingUpSession: boolean;
profileForm: FormGroup;
repoForm: FormGroup;
suggestions: string[];
filteredSuggestions: Observable<string[]>;

@Input() urlEncodedSessionName: string;
Expand All @@ -29,6 +28,7 @@ export class SessionSelectionComponent implements OnInit {
private formBuilder: FormBuilder,
private logger: LoggingService,
private authService: AuthService,
private repoUrlCacheService: RepoUrlCacheService,
private errorHandlingService: ErrorHandlingService
) {}

Expand Down Expand Up @@ -73,11 +73,7 @@ export class SessionSelectionComponent implements OnInit {
window.localStorage.setItem('org', repoOrg);
window.localStorage.setItem('dataRepo', repoName);

// Update autofill repository URL suggestions in localStorage
if (!this.suggestions.includes(repoInformation)) {
this.suggestions.push(repoInformation);
window.localStorage.setItem('suggestions', JSON.stringify(this.suggestions));
}
this.repoUrlCacheService.cache(repoInformation);
}

this.logger.info(`SessionSelectionComponent: Selected Repository: ${repoInformation}`);
Expand Down Expand Up @@ -117,13 +113,8 @@ export class SessionSelectionComponent implements OnInit {
this.repoForm = this.formBuilder.group({
repo: ['', Validators.required]
});
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.repoUrlCacheService.getFilteredSuggestions(this.repoForm.get('repo'));
}

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 3c3966b

Please sign in to comment.