Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class GitLabFileBrowser extends Widget {
url,
resource.repository,
'tree',
'master',
this._drive.defaultBranch,
resource.path
);
}
Expand Down
7 changes: 7 additions & 0 deletions src/contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
this._serverSettings = ServerConnection.makeSettings();
this._fileTypeForPath = (path: string) => {
const types = registry.getFileTypesForPath(path);
return types.length === 0 ? registry.getFileType('text')! : types[0];

Check warning on line 40 in src/contents.ts

View workflow job for this annotation

GitHub Actions / build

Forbidden non-null assertion
};

this.baseUrl = DEFAULT_GITLAB_BASE_URL;
Expand Down Expand Up @@ -156,6 +156,13 @@
this._accessToken = token;
}

/**
* The repository default branch
*/
get defaultBranch(): string {
return this._defaultBranch || 'main';
}

/**
* Get a file or directory.
*
Expand Down