Created
November 26, 2021 03:04
-
-
Save samkahchiin/3d54f25ac5ecb08881aedb317d2c395e to your computer and use it in GitHub Desktop.
Github Notification cronjob
This file contains hidden or 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/bash | |
USER=$(git config user.email) | |
TOKEN=$(security find-generic-password -s github_token -w) | |
echo $USER | |
echo $TOKEN | |
echo 'Hi' | |
curl -s -u $USER:$TOKEN https://api.github.com/notifications \ | |
| jq -r '.[] | select(.unread) | select(.reason == "review-requested") | [.subject.type, .reason, .subject.title] | @sh' \ | |
| xargs -n 3 sh -c \ | |
'terminal-notifier -title "GitHub Notification" -subtitle "$0 $1" -message "$2" -open "https://github.com/notifications"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment