Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/shared/backend/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function createSuggestion(item: GQL.SearchSuggestion): Suggestion | null
case 'Repository': {
return {
type: 'repo',
title: item.uri,
title: item.name,
url: `/${item.name}`,
urlLabel: 'go to repository',
}
Expand All @@ -90,7 +90,7 @@ export function createSuggestion(item: GQL.SearchSuggestion): Suggestion | null
if (dir !== undefined && dir !== '.') {
descriptionParts.push(`${dir}/`)
}
descriptionParts.push(basename(item.repository.uri))
descriptionParts.push(basename(item.repository.name))
if (item.isDirectory) {
return {
type: 'dir',
Expand All @@ -114,7 +114,7 @@ export function createSuggestion(item: GQL.SearchSuggestion): Suggestion | null
kind: item.kind,
title: item.name,
description: `${item.containerName || item.location.resource.path} — ${basename(
item.location.resource.repository.uri
item.location.resource.repository.name
)}`,
url: item.url,
urlLabel: 'go to definition',
Expand All @@ -136,7 +136,7 @@ const symbolsFragment = `
resource {
path
repository {
uri
name
}
}
url
Expand All @@ -158,7 +158,7 @@ export const fetchSuggestions = (options: SearchOptions, first: number) =>
suggestions(first: $first) {
... on Repository {
__typename
uri
name
}
... on File {
__typename
Expand All @@ -167,7 +167,7 @@ export const fetchSuggestions = (options: SearchOptions, first: number) =>
isDirectory
url
repository {
uri
name
}
}
... on Symbol {
Expand Down
8 changes: 4 additions & 4 deletions src/shared/repo/backend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const resolveParentRev = memoizeObservable(
queryGraphQL({
ctx: getContext({ repoKey: ctx.repoPath }),
request: `query ResolveParentRev($repoPath: String!, $rev: String!) {
repository(uri: $repoPath) {
repository(name: $repoPath) {
mirrorInfo {
cloneInProgress
}
Expand Down Expand Up @@ -59,7 +59,7 @@ export const resolveRepo = memoizeObservable(
queryGraphQL({
ctx: getContext({ repoKey: ctx.repoPath }),
request: `query ResolveRepo($repoPath: String!) {
repository(uri: $repoPath) {
repository(name: $repoPath) {
url
}
}`,
Expand All @@ -85,7 +85,7 @@ export const resolveRev = memoizeObservable(
queryGraphQL({
ctx: getContext({ repoKey: ctx.repoPath }),
request: `query ResolveRev($repoPath: String!, $rev: String!) {
repository(uri: $repoPath) {
repository(name: $repoPath) {
mirrorInfo {
cloneInProgress
}
Expand Down Expand Up @@ -180,7 +180,7 @@ export const fetchBlobContentLines = memoizeObservable(
queryGraphQL({
ctx: getContext({ repoKey: ctx.repoPath }),
request: `query BlobContent($repoPath: String!, $commitID: String!, $filePath: String!) {
repository(uri: $repoPath) {
repository(name: $repoPath) {
commit(rev: $commitID) {
file(path: $filePath) {
content
Expand Down