diff options
author | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-08-25 06:58:16 +0100 |
---|---|---|
committer | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-08-25 06:58:16 +0100 |
commit | fd15a1a92161a30ad49ee01d47673dd7d74a9a0a (patch) | |
tree | c1b68cd0ec8d0ef9d5b63fe1a2215cb8243ad59e | |
parent | 33ca6fbe7922b4e73e79c583ff511790dabcf975 (diff) |
attempt to stop him reporting changes as creations
-rwxr-xr-x | chili_change_detector | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chili_change_detector b/chili_change_detector index e01289c..b113c44 100755 --- a/chili_change_detector +++ b/chili_change_detector @@ -158,7 +158,8 @@ else for i in "${!bugs[@]}" do ii=$( sed 's/([^)]\+)//' <<< "${i}" ) - echo "${ii%%🐵*}" + [[ "${ii%%🐵*}" =~ \#[[:digit:]]+ ]] # match the bug number e.g. #390 + echo "${BASH_REMATCH}" done > "${seen_issues_log}" fi @@ -182,14 +183,16 @@ do then # Check the log of seen issues to find out if this is a creation or # a change. - if grep "${ii%%🐵*}" "${seen_issues_log}" > /dev/null 2> /dev/null + [[ "${ii%%🐵*}" =~ \#[[:digit:]]+ ]] # match the bug number e.g. #390 + + if grep "${BASH_REMATCH}" "${seen_issues_log}" > /dev/null 2> /dev/null then creation_or_change="change" else creation_or_change="creation" # Add this issue to the log. - echo "${ii%%🐵*}" >> "${seen_issues_log}" + echo "${BASH_REMATCH}" >> "${seen_issues_log}" fi real_title="${i%%🐵*}" |