Skip to content

Commit 4ba097d

Browse files
Merge pull request #3941 from github/robertbrignull/download_private_dbs
Change database download to always be authenticated
2 parents 4397ce3 + f53c846 commit 4ba097d

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

extensions/ql-vscode/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [UNRELEASED]
44

5+
- Always authenticate when downloading databases from GitHub, instead of only when in canary mode. [#3941](https://github.com/github/vscode-codeql/pull/3941)
6+
57
## 1.17.1 - 23 January 2025
68

79
- Remove support for CodeQL CLI versions older than 2.18.4. [#3895](https://github.com/github/vscode-codeql/pull/3895)

extensions/ql-vscode/src/databases/database-fetcher.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ import {
2828
allowHttp,
2929
downloadTimeout,
3030
getGitHubInstanceUrl,
31-
hasGhecDrUri,
32-
isCanary,
3331
} from "../config";
3432
import { showAndLogInformationMessage } from "../common/logging";
35-
import { AppOctokit } from "../common/octokit";
3633
import type { DatabaseOrigin } from "./local-databases/database-origin";
3734
import { createTimeoutSignal } from "../common/fetch-stream";
3835
import type { App } from "../common/app";
@@ -187,12 +184,7 @@ export class DatabaseFetcher {
187184
throw new Error(`Invalid GitHub repository: ${githubRepo}`);
188185
}
189186

190-
const credentials =
191-
isCanary() || hasGhecDrUri() ? this.app.credentials : undefined;
192-
193-
const octokit = credentials
194-
? await credentials.getOctokit()
195-
: new AppOctokit();
187+
const octokit = await this.app.credentials.getOctokit();
196188

197189
const result = await convertGithubNwoToDatabaseUrl(
198190
nwo,

0 commit comments

Comments
 (0)