Skip to content

Commit

Permalink
Fix #28: Add 'chore' tags
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamHillier committed Jun 27, 2018
1 parent 2ec96cd commit 08b8101
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/config/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
style: {color: "var(--red-50)", fontWeight: "bold"},
label: "defect"
},
"NEEDINFO": {
"needinfo": {
style: {color: "var(--gray-90)", fontWeight: "bold"},
label: "🤔 needinfo"
},
Expand All @@ -32,5 +32,9 @@ module.exports = {
"strings m-c needed": {
label: "strings m-c needed",
style: {backgroundColor: "var(--teal-80", color: "white", border: 0, fontWeight: "bold"}
},
"chore": {
label: "chore",
style: {backgroundColor: "var(--purple-60)", color: "white", border: 0, fontWeight: "bold"}
}
};
8 changes: 6 additions & 2 deletions src/content/components/BugList/columnTransforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {DateTime} from "luxon";

const OPEN_BUG_URL = "https://bugzilla.mozilla.org/show_bug.cgi?id=";

const WHITEBOARD_TAGS = ["needinfo", "chore"];

const numberWithSpaces = n => {
const letters = n.toString().split("");
return (<React.Fragment><span>{letters.slice(0, -3).join("")}</span><span>{letters.slice(-3).join("")}</span></React.Fragment>);
Expand Down Expand Up @@ -33,8 +35,10 @@ function renderWhiteboard({whiteboard, keywords, severity, hasPR, flags}) {
if (hasPR) {
tags.push("has-pr");
}
if (flags && flags.find(flag => flag.name === "needinfo")) {
tags.push("NEEDINFO");
if (flags) {
WHITEBOARD_TAGS
.filter(tag => flags.find(flag => flag.name === tag))
.forEach(tags.push)
}

return <ul className={styles.tagList}>{tags.map(tag => {
Expand Down

0 comments on commit 08b8101

Please sign in to comment.