Created
February 15, 2021 09:40
-
-
Save keegancsmith/0277678a822f7a1c1c2823c2e61b3992 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
cmd=${1-urls} | |
query='tag:gh and tag:inbox body:"Reply to this email directly or view it on GitHub"' | |
case "$cmd" in | |
"urls") | |
notmuch show "$query" | egrep -o '^https://github\.com.*/(issues|pull)/[0-9]+' | sort | uniq | |
;; | |
"done") | |
notmuch tag -inbox -unread "$query" | |
;; | |
*) | |
echo "Unknown command $cmd" | |
echo "USAGE: notmuch github urls|done" | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment