Get rid of the proprosal-in-review
label (#1036)
Everything is in review. We may as well just use the draft state for WIP stuff.
This commit is contained in:
parent
39d472fac0
commit
a164302164
2 changed files with 31 additions and 24 deletions
|
@ -29,10 +29,6 @@ const outputDir = path.join(__dirname, "../data/msc");
|
|||
* - `title`: used for things like headings in renderings of the proposals
|
||||
*/
|
||||
const states = [
|
||||
{
|
||||
label: "proposal-in-review",
|
||||
title: "Proposal In Review"
|
||||
},
|
||||
{
|
||||
label: "proposed-final-comment-period",
|
||||
title: "Proposed Final Comment Period"
|
||||
|
@ -188,23 +184,34 @@ function processIssues() {
|
|||
fs.mkdirSync(outputDir);
|
||||
}
|
||||
const output = [];
|
||||
// make a group of "work in progress" proposals,
|
||||
// which are identified by not having any of the state labels
|
||||
const stateLabels = states.map(s => s.label);
|
||||
const worksInProgress = issues.filter(issue => {
|
||||
const labelsForIssue = issue.labels.map(l => l.name);
|
||||
return intersection(labelsForIssue, stateLabels).length === 0;
|
||||
});
|
||||
|
||||
// make a group of "work in progress" proposals, for those in draft.
|
||||
output.push({
|
||||
title: "Work In Progress",
|
||||
label: "work-in-progress",
|
||||
proposals: worksInProgress.map(issue => getProposalFromIssue(issue))
|
||||
proposals: issues
|
||||
.filter(issue => issue.state == "open" && issue.draft)
|
||||
.map(issue => getProposalFromIssue(issue))
|
||||
});
|
||||
|
||||
// now the 'Proposal In Review' section, which are identified by
|
||||
// not having any of the state labels
|
||||
const stateLabels = states.map(s => s.label);
|
||||
const proposalsInReview = issues.filter(issue => {
|
||||
const labelsForIssue = issue.labels.map(l => l.name);
|
||||
return !issue.draft && intersection(labelsForIssue, stateLabels).length === 0;
|
||||
});
|
||||
output.push({
|
||||
title: "Proposal In Review",
|
||||
label: "proposal-in-review",
|
||||
proposals: proposalsInReview.map(issue => getProposalFromIssue(issue))
|
||||
});
|
||||
|
||||
// for each defined state
|
||||
for (const state of states) {
|
||||
// get the set of issues for that state
|
||||
const issuesForState = issues.filter(msc => {
|
||||
return msc.labels.some(l => l.name === state.label);
|
||||
return !msc.draft && msc.labels.some(l => l.name === state.label);
|
||||
});
|
||||
// store it in /data
|
||||
output.push({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue