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/bash | |
usage () { | |
cat >&2 <<EOF | |
Usage: $0 (-r /path/to/git/repo | -u scheme:///git/repo/to/clone) [OPTIONS] | |
Detect potentially stale branches in a git repository and notify committers | |
or a designated party. | |
Mandatory arguments to long options are mandatory for short options too. |
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
require [ "regex", "editheader", "relational", "variables" ]; | |
if header :is "X-Phabricator-Sent-This-Message" "Yes" { | |
# assumption: common mail domain | |
set "msfx" "@example.com"; | |
# match up to 3 subscribers | |
if header :regex "X-Phabricator-Stamps" "subscriber\\([@#]([^\\)]+)\\)(.+subscriber\\([@#]([^\\)]+)\\))?(.+subscriber\\([@#]([^\\)]+)\\))?" { | |
set "psub" "${1}${msfx}"; | |
if string :count "ne" "${3}" ["0"] { | |
set "psub" "${psub}, ${3}${msfx}"; |
OlderNewer