From 3ac0c5db0365f8255df1bb06dd8983be5929f295 Mon Sep 17 00:00:00 2001 From: Oscar Brito Date: Wed, 15 Dec 2021 11:54:23 +0000 Subject: [PATCH] Fix IGNORE_PROJECT_IDS condition (#53) --- src/main.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.sh b/src/main.sh index bf9e26f0..cf553262 100644 --- a/src/main.sh +++ b/src/main.sh @@ -46,12 +46,12 @@ main() { project_id="$(teamwork::get_project_id_from_task "$task_id")" export TEAMWORK_PROJECT_ID=$project_id - # ignored_project_ids=("${IGNORE_PROJECT_IDS:-}") - # if (( ${#ignored_project_ids[@]} != 0 )) || utils::in_array "$1" "${ignored_project_ids[*]}" - # then - # log::message "ignored due to IGNORE_PROJECT_IDS" - # exit 0 - # fi + ignored_project_ids=("${IGNORE_PROJECT_IDS:-}") + if utils::in_array "$project_id" "${ignored_project_ids[*]}" + then + log::message "ignored due to IGNORE_PROJECT_IDS" + exit 0 + fi if [ "$event" == "pull_request" ] && [ "$action" == "opened" ]; then teamwork::pull_request_opened