Skip to content

Commit bc00959

Browse files
committed
bugfix-319-setup-crash-on-repository-with-no-issues: introduce ACTIONS constant and replace the 'initial_setup' string literal with ACTIONS.INITIAL_SETUP.
1 parent ba3b224 commit bc00959

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/data/model/execution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ConfigurationHandler } from "../../manager/description/configuration_ha
44
import { GetHotfixVersionUseCase } from "../../usecase/steps/common/get_hotfix_version_use_case";
55
import { GetReleaseTypeUseCase } from "../../usecase/steps/common/get_release_type_use_case";
66
import { GetReleaseVersionUseCase } from "../../usecase/steps/common/get_release_version_use_case";
7-
import { INPUT_KEYS } from "../../utils/constants";
7+
import { ACTIONS, INPUT_KEYS } from "../../utils/constants";
88
import { branchesForManagement, typesForIssue } from "../../utils/label_utils";
99
import { logDebugInfo, setGlobalLoggerDebug } from "../../utils/logger";
1010
import { extractIssueNumberFromBranch, extractIssueNumberFromPush } from "../../utils/title_utils";
@@ -303,7 +303,7 @@ export class Execution {
303303
this.tokens.token
304304
);
305305
} catch (error) {
306-
const isInitialSetup = this.singleAction.currentSingleAction === 'initial_setup';
306+
const isInitialSetup = this.singleAction.currentSingleAction === ACTIONS.INITIAL_SETUP;
307307
if (this.isSingleAction && isInitialSetup) {
308308
logDebugInfo('Skipping initial labels fetch for setup action.');
309309
this.labels.currentIssueLabels = [];

src/utils/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,11 @@ export const INPUT_KEYS = {
381381
PULL_REQUEST_DESIRED_REVIEWERS_COUNT: 'desired-reviewers-count',
382382
PULL_REQUEST_MERGE_TIMEOUT: 'merge-timeout',
383383

384-
} as const;
384+
} as const;
385385

386386
export const ERRORS = {
387387
GIT_REPOSITORY_NOT_FOUND: '❌ Git repository not found'
388-
} as const;
388+
} as const;
389389

390390
export const ACTIONS = {
391391
DEPLOYED: 'deployed_action',
@@ -397,7 +397,7 @@ export const ACTIONS = {
397397
CHECK_PROGRESS: 'check_progress_action',
398398
DETECT_POTENTIAL_PROBLEMS: 'detect_potential_problems_action',
399399
RECOMMEND_STEPS: 'recommend_steps_action',
400-
} as const;
400+
} as const;
401401

402402
/** Hidden HTML comment prefix for bugbot findings (issue/PR comments). Format: <!-- copilot-bugbot finding_id:"id" resolved:true|false --> */
403403
export const BUGBOT_MARKER_PREFIX = 'copilot-bugbot';

0 commit comments

Comments
 (0)