Files
minecraft-bedrock-json-schemas/test/src/github.ts
Daan Verstraten 8e59f63167 Feature/jest2 (#322)
* Adding more tests
* adding jest
* fixing tests
* fixing linting
* removing 1 slash less
* fixing more tests
* fixing last test
* more last fixes
2024-11-09 10:08:30 +01:00

27 lines
619 B
TypeScript

export interface ErrorAnnotation {
file?: string;
line?: number;
column?: number;
endLine?: number;
title?: string;
}
export namespace Github {
export function createError(message: string, error: ErrorAnnotation = {}): void {
const data = Object.entries(error)
.filter(([, value]) => value !== undefined)
.map(([key, value]) => `${key}=${value}`)
.join(",");
console.log(`::error ${data}::${message}`);
}
export function startGroup(title: string): void {
console.log(`::group::${title}`);
}
export function endGroup(): void {
console.log(`::endgroup::`);
}
}