Skip to content

Commit

Permalink
Update sort-closed-issues.js
Browse files Browse the repository at this point in the history
  • Loading branch information
t-will-gillis authored Nov 27, 2024
1 parent fcaeea0 commit 26832e0
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 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,18 +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 overrideSoftLabels = ['role: front end'];
const softLabels = [roleBackEndDevOps, featureAnalytics];

const issueLabels = obtainLabels(context);
const overrideSoftLabels = [roleFrontEnd];

// checks if label is a hard label
const isHardLabel = (label) => hardLabels.includes(label);
Expand Down

0 comments on commit 26832e0

Please sign in to comment.