-
Notifications
You must be signed in to change notification settings - Fork 0
User scripts
Joern Bernhardt edited this page Oct 1, 2018
·
9 revisions
This is a small collection of scripts to readily be used as user scripts. If you want to share something, feel free!
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)], []);
}