Skip to content

User scripts

Joern Bernhardt edited this page Oct 1, 2018 · 9 revisions

Collection of user scripts

This is a small collection of scripts to readily be used as user scripts. If you want to share something, feel free!

List all todos labeled with a specific label

const LABEL_TO_LOOK_FOR = "#bug";

const result = flattenTodos(list)
  .filter(todo => todo.labels.some(l => l === LABEL_TO_LOOK_FOR))
  .map(todo => todo.title);

console.log(result.join("\n"));

function flattenTodos(list) {
  return list.reduce((all, item) => [...all, item, ...flattenTodos(item.children)], []);
}
Clone this wiki locally