Skip to content

Commit 6f08ea4

Browse files
committed
change status designations to HARD_CODED
1 parent d0e846b commit 6f08ea4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

github-actions/trigger-issue/add-preliminary-comment/check-complexity-eligibility.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ const [
3434
const EXCEPTION_LABELS = [ER, epic];
3535
const REQUIRED_ROLE_LABELS = [roleFrontEnd, roleBackEndDevOps];
3636
const REQUIRED_COMPLEXITY_LABELS = [complexity1, complexity2, complexity3];
37-
// Statuses
38-
const newIssueApproval = 'New Issue Approval';
39-
const inProgressActivelyWorking = 'In progress (actively working)';
37+
// Hard-coded statuses
38+
const NEW_ISSUE_APPROVAL = 'New Issue Approval';
39+
const IN_PROGRESS = 'In progress (actively working)';
4040

4141

4242
/**
@@ -72,7 +72,7 @@ async function checkComplexityEligibility(
7272
);
7373

7474
// If issue's status is New Issue Approval, skip complexity check
75-
if (statusName === newIssueApproval) {
75+
if (statusName === NEW_ISSUE_APPROVAL) {
7676
return true;
7777
}
7878

@@ -376,12 +376,12 @@ async function handleIssueComplexityNotPermitted(
376376
labels: [statusUnassignedByBot],
377377
});
378378

379-
// Change issue's status to New Issue Approval
379+
// Change issue's status to NEW_ISSUE_APPROVAL
380380
await mutateIssueStatus(
381381
github,
382382
context,
383383
projectItemId,
384-
statusFieldIds(newIssueApproval)
384+
statusFieldIds(NEW_ISSUE_APPROVAL)
385385
);
386386

387387
// If the assignee's Skills Issue (Pre-work Checklist) is closed, open it
@@ -393,16 +393,16 @@ async function handleIssueComplexityNotPermitted(
393393
state: 'open',
394394
});
395395

396-
// Brief delay allows Project automation to move Prework to New Issue Approval
397-
// before script moves it to In Progress, ensuring correct final status
396+
// Brief delay allows Project automation to move Skills Issue to NEW_ISSUE_APPROVAL
397+
// before script moves it to IN_PROGRESS, ensuring correct final status
398398
await setTimeout(5000);
399399

400-
// Change Skills Issue (Pre-work Checklist) status to In Progress
400+
// Change Skills Issue (Pre-work Checklist) status to IN_PROGRESS
401401
await mutateIssueStatus(
402402
github,
403403
context,
404404
preWorkIssueProjectItemId,
405-
statusFieldIds(inProgressActivelyWorking)
405+
statusFieldIds(IN_PROGRESS)
406406
);
407407
}
408408

0 commit comments

Comments
 (0)