backend: Azure URL Reader does not yet support file path based readTree

This commit is contained in:
Himanshu Mishra
2021-01-20 18:04:42 +01:00
parent 40f8847c80
commit 3c2ec77f8b
3 changed files with 4 additions and 6 deletions
@@ -76,6 +76,8 @@ export class AzureUrlReader implements UrlReader {
url: string,
options?: ReadTreeOptions,
): Promise<ReadTreeResponse> {
// TODO: Support filepath based reading tree feature like other providers
// Get latest commit SHA
const commitsAzureResponse = await fetch(
@@ -101,17 +101,13 @@ export class BitbucketUrlReader implements UrlReader {
url: string,
options?: ReadTreeOptions,
): Promise<ReadTreeResponse> {
const { name: repoName, owner: project, resource, filepath } = parseGitUrl(
url,
);
const { filepath } = parseGitUrl(url);
const lastCommitShortHash = await this.getLastCommitShortHash(url);
if (options?.etag && options.etag === lastCommitShortHash) {
throw new NotModifiedError();
}
const isHosted = resource === 'bitbucket.org';
const downloadUrl = await getBitbucketDownloadUrl(url, this.config);
const archiveBitbucketResponse = await fetch(
downloadUrl,
@@ -78,7 +78,7 @@ export class GitlabUrlReader implements UrlReader {
url: string,
options?: ReadTreeOptions,
): Promise<ReadTreeResponse> {
const { name: repoName, ref, full_name, filepath } = parseGitUrl(url);
const { ref, full_name, filepath } = parseGitUrl(url);
// Use GitLab API to get the default branch
// encodeURIComponent is required for GitLab API