]> Sergey Matveev's repositories - schwabrak.git/blob - list
Filter by tags
[schwabrak.git] / list
1 #!/usr/bin/env zsh
2
3 root=$0:h:a
4 . $root/lib.zsh.rc
5
6 tagsOur=($@)
7
8 for issue (issues/**/created) {
9     issue=$issue:h
10     issue=${issue#issues/}
11
12     tagsTheir=(`$root/tag-list $issue`)
13     tagsFound=0
14     for our ($tagsOur) {
15         for their ($tagsTheir) {
16             if [[ $their =~ $our ]] ; then
17                 tagsFound=$(( $tagsFound + 1 ))
18                 break
19             fi
20         }
21     }
22     [[ $tagsFound -eq ${#tagsOur} ]] || continue
23
24     print -n `cat issues/$issue/created`\\t$issue\\t
25     print $tagsTheir
26 } | sort -r