function parseTags()

in src/content/components/BugList/columnTransforms.js [72:97]


function parseTags({ whiteboard, keywords, hasPR, flags, needinfo_nick }) {
  const regex = /\[(.+?)\]/g;
  let matches = [];
  let tags = [];
  if (keywords) {
    tags = tags.concat(keywords);
  }
  while ((matches = regex.exec(whiteboard))) {
    // eslint-disable-line no-cond-assign
    tags.push(matches[1]);
  }
  if (hasPR) {
    tags.push("has-pr");
  }
  if (needinfo_nick) {
    tags.push(`ni?${needinfo_nick}`);
  } else if (flags && flags.find(flag => flag.name === "needinfo")) {
    let parsedNick = getNeedinfoNick(flags);
    if (parsedNick) {
      tags.push(`ni?${parsedNick}`);
    } else {
      tags.push("needinfo");
    }
  }
  return tags;
}