-
-
Save potch/805181 to your computer and use it in GitHub Desktop.
Bugzilla checker (bugzilla.mozilla.org)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MILESTONE='5.12.9' | |
ASSIGNEDTO='bob@butts.biz' | |
PRODUCT='addons.mozilla.org' | |
BUGZILLA='https://bugzilla.mozilla.org/show_bug.cgi?id=' | |
QUERY="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=$ASSIGNEDTO&emailassigned_to1=1&emailtype1=exact&product=$PRODUCT&query_format=advanced&order=Assignee&target_milestone=$MILESTONE&ctype=csv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
source ~/.bz | |
if [[ $1 == 'all' ]]; then | |
open $QUERY | |
else | |
if [[ $1 == 'nobody' ]]; then | |
ASSIGNEDTO='nobody@mozilla.org' | |
QUERY="https://bugzilla.mozilla.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=$ASSIGNEDTO&emailassigned_to1=1&emailtype1=exact&product=$PRODUCT&query_format=advanced&order=Assignee&target_milestone=$MILESTONE&ctype=csv" | |
shift 1 | |
fi | |
if [[ $1 ]]; then | |
curl -s $QUERY | | |
awk -F\, ' | |
{ | |
if (NR-1 == bte) | |
print bz $1 "#comments" | |
}' bte=$1 bz=$BUGZILLA | | |
xargs open -g | |
else | |
curl -s $QUERY | wc | echo | |
echo | |
curl -s $QUERY | | |
sed 's/\","/\|/g;s/\"$//g;s/\"\"/"/g;s/\([0-9]\),\"/\1\|/g' | | |
awk -F\| ' | |
{ | |
sp = " " | |
if (NR>10) | |
sp = " " | |
if (NR > 1) | |
print NR-1 ")" sp , $1, " ", $3 ," ", $8 | |
}' | |
echo | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment