Skip to content

Commit

Permalink
Refactor GHA 'sort-closed-issues.js' (#7729)
Browse files Browse the repository at this point in the history
* refactor labelNames in sort-closed-issues.js to use labelKeys

* fixed retrieveLabel import module
  • Loading branch information
aadilahmed authored Nov 27, 2024
1 parent fcaeea0 commit 11a5f3d
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions github-actions/move-closed-issues/sort-closed-issues.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const obtainLabels = require('../utils/obtain-labels');
const retrieveLabelDirectory = require('../utils/retrieve-label-directory');

/**
* Check the labels of an issue, and return the 'status' the issue should be sorted into when closed
Expand All @@ -10,16 +11,35 @@ function main({ context }) {
const doneStatus = 'Done';
const QAStatus = 'QA';

// Use labelKeys to retrieve current labelNames from directory
const [
featureRefactorCss,
featureRefactorHtml,
featureRefactorJsLiquid,
featureRefactorGha,
roleBackEndDevOps,
featureAnalytics,
roleFrontEnd
] = [
"featureRefactorCss",
"featureRefactorHtml",
"featureRefactorJsLiquid",
"featureRefactorGha",
"roleBackEndDevOps",
"featureAnalytics",
"roleFrontEnd"
].map(retrieveLabelDirectory);

const hardLabels = [
'Feature: Refactor CSS',
'Feature: Refactor HTML',
'Feature: Refactor JS / Liquid',
'Feature: Refactor GHA',
featureRefactorCss,
featureRefactorHtml,
featureRefactorJsLiquid,
featureRefactorGha,
];

const softLabels = ['role: back end/devOps', 'Feature: Analytics'];
const softLabels = [roleBackEndDevOps, featureAnalytics];

const overrideSoftLabels = ['role: front end'];
const overrideSoftLabels = [roleFrontEnd];

const issueLabels = obtainLabels(context);

Expand Down

0 comments on commit 11a5f3d

Please sign in to comment.