Skip to content

Commit 309a2c3

Browse files
committed
Add blurbs
1 parent b69455a commit 309a2c3

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/actions/update-bundle/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Updates src/defaults.json to point to a new CodeQL bundle release, and refreshes the
3+
* snapshot of known language aliases in `src/known-language-aliases.json`.
4+
*/
5+
16
import * as github from '@actions/github';
27
import * as fs from 'fs';
38
import * as path from 'path';

.github/actions/update-bundle/language-aliases.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/*
2+
* The CodeQL CLI is the source of truth for language aliases. However, in some parts of the
3+
* Action it is practical to resolve language aliases before the CodeQL CLI has been installed.
4+
* Therefore we accept some duplication and store a snapshot of the known language aliases in
5+
* `src/known-language-aliases.json`.
6+
*
7+
* This module handles downloading and extracting a CodeQL bundle, running the CLI to resolve
8+
* language aliases, and writing the result back to `src/known-language-aliases.json`.
9+
*/
10+
111
import { execFileSync } from 'child_process';
212
import * as fs from 'fs';
313
import * as os from 'os';
@@ -27,6 +37,8 @@ const KNOWN_LANGUAGE_ALIASES_PATH = path.resolve(
2737
export function assertSupportedPlatform(
2838
platform: NodeJS.Platform = process.platform
2939
): void {
40+
// We'll only ever run this on Linux in CI, but it's useful to support macOS too
41+
// for local testing.
3042
if (platform !== 'linux' && platform !== 'darwin') {
3143
throw new Error(
3244
`The update-bundle script must run on Linux or macOS. Current platform: ${platform}.`
@@ -116,7 +128,7 @@ export async function updateKnownLanguageAliasesFromRelease(
116128
});
117129

118130
const codeqlCliPath = path.join(extractDir, 'codeql', 'codeql');
119-
console.log('Resolving language aliases using bundled CodeQL CLI');
131+
console.log('Resolving language aliases using CodeQL CLI');
120132
const output = execFileSync(
121133
codeqlCliPath,
122134
['resolve', 'languages', '--format=betterjson', '--extractor-include-aliases'],

0 commit comments

Comments
 (0)