Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor GHA 'sort-closed-issues.js' #7729

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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