gitea_get_notifications.sh: more reponamefilter regex fun

This commit is contained in:
Oliver Schraml 2022-01-26 13:56:07 +01:00 committed by suchademon
parent f39462a835
commit d0a2439d11
Signed by: oliver.schraml
GPG Key ID: A55864B79D0D0228
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ if [ "${gettype}" == "merged" ]; then
mark_read=false
noti_id="$(grep -oE "^[0-9]+" <<<"${merged_noti}")"
noti_pr_id="$(grep -oE '@@#[0-9]+@@' <<<"${merged_noti}" | sed -e 's/[@#]//g')"
noti_repo="$(grep -oE '@[a-z0-9]+/[a-z0-9]+$' <<<"${merged_noti}" | sed -e 's/@//g')"
noti_repo="$(grep -oE '@[a-z0-9_.-]+.[a-z0-9_.-]+$' <<<"${merged_noti}" | sed -e 's/@//g')"
pr_info=$(tea pr ls --state all --repo "${noti_repo}" | grep -E "^\| +${noti_pr_id} .* closed ")
if grep -qE " closed +\| +${myuser} +\|" <<<"${pr_info}"; then
@ -52,7 +52,7 @@ elif [ "${gettype}" == "open" ]; then
for open_noti in ${open_notis}; do
noti_id="$(grep -oE "^[0-9]+" <<<"${open_noti}")"
noti_pr_id="$(grep -oE '@@#[0-9]+@@' <<<"${open_noti}" | sed -e 's/[@#]//g')"
noti_repo="$(grep -oE '@[a-z0-9_-]+.[a-z0-9_-]+$' <<<"${open_noti}" | sed -e 's/@//g')"
noti_repo="$(grep -oE '@[a-z0-9_.-]+.[a-z0-9_.-]+$' <<<"${open_noti}" | sed -e 's/@//g')"
pr_info=$(tea pr ls --state all --repo "${noti_repo}" | grep -E "^\| +${noti_pr_id} .* open ")
if grep -qE " open +\| +${myuser} +\|" <<<"${pr_info}"; then