From bedd656c59270ab0dcda674a8400e8a0a72d9b95 Mon Sep 17 00:00:00 2001 From: Liv Dywan Date: Thu, 28 Sep 2023 10:16:33 +0000 Subject: [PATCH] Mention when force result will not be applied To distinguish from other cases where the result was not applied and avoid having to second-guess after the fact. See: https://progress.opensuse.org/issues/135782 --- openqa-label-known-issues | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openqa-label-known-issues b/openqa-label-known-issues index 07d7e507..386677f2 100755 --- a/openqa-label-known-issues +++ b/openqa-label-known-issues @@ -15,6 +15,7 @@ dry_run="${dry_run:-"0"}" min_search_term="${min_search_term:-"16"}" issue_marker="${issue_marker:-"auto_review%3A"}" issue_query="${issue_query:-"https://progress.opensuse.org/projects/openqav3/issues.json?limit=200&subproject_id=*&subject=~${issue_marker}"}" +force_result_tracker="${force_result_tracker:-"openqa-force-result"}" reason_min_length="${reason_min_length:-"8"}" grep_timeout="${grep_timeout:-5}" email_unreviewed=${email_unreviewed:-false} @@ -81,8 +82,12 @@ label_on_issues_from_issue_tracker() { force_result='' label="poo#$issue $subject" if [[ ${#search} -ge $min_search_term ]]; then - if [[ $tracker == 'openqa-force-result' && $after =~ :force_result:([a-z_]+) ]]; then - force_result=${BASH_REMATCH[1]} + if [[ $after =~ :force_result:([a-z_]+) ]]; then + if [[ $tracker == $force_result_tracker ]]; then + force_result=${BASH_REMATCH[1]} + else + label="$label (Ignoring force result for ticket which is not in $force_result_tracker)" + fi fi label-on-issue "$id" "$search" "$label" "${after//*\":retry*/1}" "$force_result" && break fi