Refactoring: Convert ActionName to enum

This commit is contained in:
Henry Mercer 2024-02-29 11:29:32 +00:00
parent e12a8cc5eb
commit c0917251d4
27 changed files with 123 additions and 111 deletions

View file

@ -26,6 +26,7 @@ import { getActionsLogger, Logger } from "./logging";
import { parseRepositoryNwo } from "./repository";
import * as statusReport from "./status-report";
import {
ActionName,
createStatusReportBase,
DatabaseCreationTimings,
getActionsStatus,
@ -64,7 +65,7 @@ async function sendStatusReport(
) {
const status = getActionsStatus(error, stats?.analyze_failure_language);
const statusReportBase = await createStatusReportBase(
"finish",
ActionName.Analyze,
status,
startedAt,
config,
@ -191,7 +192,7 @@ async function run() {
try {
await statusReport.sendStatusReport(
await createStatusReportBase(
"finish",
ActionName.Analyze,
"starting",
startedAt,
undefined,