Skip to content

Commit 7fe707a

Browse files
committed
Add database id and created_at to origin
1 parent 0b964f0 commit 7fe707a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ export async function downloadGitHubDatabase(
204204
return;
205205
}
206206

207-
const { databaseUrl, name, owner, commitOid } = result;
207+
const { databaseUrl, name, owner, databaseId, databaseCreatedAt, commitOid } =
208+
result;
208209

209210
/**
210211
* The 'token' property of the token object returned by `octokit.auth()`.
@@ -229,6 +230,8 @@ export async function downloadGitHubDatabase(
229230
{
230231
type: "github",
231232
repository: nwo,
233+
databaseId,
234+
databaseCreatedAt,
232235
commitOid,
233236
},
234237
progress,
@@ -550,6 +553,8 @@ export async function convertGithubNwoToDatabaseUrl(
550553
databaseUrl: string;
551554
owner: string;
552555
name: string;
556+
databaseId: number;
557+
databaseCreatedAt: string;
553558
commitOid: string | null;
554559
}
555560
| undefined
@@ -582,6 +587,8 @@ export async function convertGithubNwoToDatabaseUrl(
582587
databaseUrl: `https://api.github.com/repos/${owner}/${repo}/code-scanning/codeql/databases/${language}`,
583588
owner,
584589
name: repo,
590+
databaseId: databaseForLanguage.id,
591+
databaseCreatedAt: databaseForLanguage.created_at,
585592
commitOid: databaseForLanguage.commit_oid,
586593
};
587594
} catch (e) {

extensions/ql-vscode/src/databases/local-databases/database-origin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ interface DatabaseOriginArchive {
1010
interface DatabaseOriginGitHub {
1111
type: "github";
1212
repository: string;
13+
databaseId: number;
14+
databaseCreatedAt: string;
1315
commitOid: string | null;
1416
}
1517

0 commit comments

Comments
 (0)