Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete git repository name #3372

Merged
merged 13 commits into from
Feb 14, 2019
Prev Previous commit
Next Next commit
Fix getMatchingRepositories typo
  • Loading branch information
nwmac committed Jan 24, 2019
commit 273c99aa3380d34b5434bf42a162a37a328e0ed3
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ export class DeployApplicationStep2Component

return observableTimer(500).pipe(
take(1),
switchMap(() => this.scm.getMacthingRepositories(name)),
switchMap(() => this.scm.getMatchingRepositories(name)),
tap(suggestions => this.cachedSuggestions[cacheName] = suggestions)
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/app/shared/data-services/scm/github-scm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class GitHubSCM implements GitSCM {
return `https://github.com/${projectName}/compare/${commitSha1}...${commitSha2}`;
}

getMacthingRepositories(projectName: string): Observable<string[]> {
getMatchingRepositories(projectName: string): Observable<string[]> {
const prjParts = projectName.split('/');
let url = `${this.gitHubURL}/search/repositories?q=${projectName}+in:name`;
if (prjParts.length > 1) {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/app/shared/data-services/scm/gitlab-scm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class GitLabSCM implements GitSCM {
return `https://gitlab.com/${projectName}/compare/${commitSha1}...${commitSha2}`;
}

getMacthingRepositories(projectName: string): Observable<string[]> {
getMatchingRepositories(projectName: string): Observable<string[]> {
const prjParts = projectName.split('/');
let url = `${gitLabAPIUrl}/projects?search=${projectName}`;
if (prjParts.length > 1) {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/app/shared/data-services/scm/scm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export interface GitSCM {
getCloneURL(projectName: string): string;
getCommitURL(projectName: string, commitSha: string): string;
getCompareCommitURL(projectName: string, commitSha1: string, commitSha2: string): string;
getMacthingRepositories(projectName: string): Observable<string[]>;
getMatchingRepositories(projectName: string): Observable<string[]>;
}