From 87278fca2f25528459ee6f879665734e83dabf13 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 21 Jan 2018 21:57:18 +0100 Subject: postrecv-bugs: Revert the arch team part for now Revert the arch team support commits until I have more time to investigate the reported failures and do it properly. --- local/postrecv-bugs | 69 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 67 deletions(-) diff --git a/local/postrecv-bugs b/local/postrecv-bugs index 1914c11..1b5ab36 100755 --- a/local/postrecv-bugs +++ b/local/postrecv-bugs @@ -14,13 +14,6 @@ ALLOWED_BRANCHES=$(git config --get gentoo.bugs.allowed-branches) declare -A COMMENT_BUGS=() declare -A CLOSE_BUGS=() -declare -A UNCC_BUGS=() - -# things we are allowed to recognize and unCC -ALL_ARCHES=( - alpha amd64 arm hppa ia64 ppc64 ppc x86 arm64 - amd64-fbsd x86-fbsd m68k mips s390 sh sparc -) while read -r oldrev newrev refname; do # operate only on branches in gentoo.bugs.allowed-branches @@ -35,7 +28,6 @@ while read -r oldrev newrev refname; do [[ ${allowed} == 0 ]] && continue while read -r commithash; do - uncc_this=() while read -r l; do case ${l} in # kinda-like github/gitlab/bitbucket but: @@ -48,19 +40,6 @@ while read -r oldrev newrev refname; do # alternate form to ref without closing Bug:*) close=0;; - # try to detect arch team work - *[sS]table*|*[sS]tabilize*|*[kK]eyword*) - # recognize common foo/bar/baz form - split_msg=( ${l//[^a-zA-Z0-9]/ } ) - for arch in "${ALL_ARCHES[@]}"; do - for word in "${split_msg[@]}"; do - if [[ ${word} == ${arch} || ${word} == ALLARCHES ]]; then - uncc_this+=( "${arch}@gentoo.org" ) - break - fi - done - done - continue;; *) continue;; esac @@ -104,10 +83,6 @@ $(git show --pretty=fuller --date=iso-local --stat "${commithash}")" else COMMENT_BUGS[${bugno}]+=${newmsg} fi - - if [[ ${uncc_this[@]} ]]; then - UNCC_BUGS[${bugno}]+=" ${uncc_this[*]/#/--remove-cc }" - fi done done < <(git show -q --pretty=format:'%B' "${commithash}") done < <(git rev-list "${oldrev}..${newrev}") @@ -122,12 +97,7 @@ for bug in "${!CLOSE_BUGS[@]}"; do Additionally, it has been referenced in the following commit(s):${COMMENT_BUGS[${bug}]}}" fi - cmd=( bugz modify -s RESOLVED -r FIXED ) - if [[ -n ${UNCC_BUGS[${bug}]} ]]; then - cmd+=( ${UNCC_BUGS[${bug}]} ) - fi - cmd+=( -c "${msg}" "${bug}" ) - "${cmd[@]}" + bugz modify -s RESOLVED -r FIXED -c "${msg}" "${bug}" done for bug in "${!COMMENT_BUGS[@]}"; do @@ -135,42 +105,7 @@ for bug in "${!COMMENT_BUGS[@]}"; do msg="The bug has been referenced in the following commit(s):${COMMENT_BUGS[${bug}]}}" - cmd=( bugz modify ) - if [[ -n ${UNCC_BUGS[${bug}]} ]]; then - cmd+=( ${UNCC_BUGS[${bug}]} ) - fi - cmd+=( -c "${msg}" "${bug}" ) - "${cmd[@]}" -done - -for bug in "${!UNCC_BUGS[@]}"; do - is_kws= - are_arches_cced= - is_closed= - while read -r key colon value; do - if [[ ${key} == Component && ${value} == Keywording ]]; then - is_kws=1 - break - elif [[ ${key} == Component && ${value} == Stabilization ]]; then - is_kws=1 - break - elif [[ ${key} == Status && ${value} == RESOLVED ]]; then - is_closed=1 - break - elif [[ ${key} == CC ]]; then - # check whether CC contains any arches - for arch in "${ALL_ARCHES[@]}"; do - if [[ ${value} == *${arch}@gentoo.org* ]]; then - are_arches_cced=1 - break - fi - done - fi - done < <( bugz get -a -n "${bug}" ) - - if [[ ${is_kws} && ! ${are_arches_cced} && ! ${is_closed} ]]; then - bugz modify -s RESOLVED -r FIXED -c "All arches done, closing." "${bug}" - fi + bugz modify -c "${msg}" "${bug}" done exit 0 -- cgit v1.2.3-65-gdbad