From 19e7114301ad387661791f22369a32ad71dba0bc Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Tue, 11 Feb 2020 16:19:16 -0500 Subject: [PATCH 1/2] scripts/prepare_changelog: Update jq filter to ignore tech-debt labelled pull-requests --- scripts/prepare_changelog.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/prepare_changelog.sh b/scripts/prepare_changelog.sh index 74c8382e6..658e0dd06 100755 --- a/scripts/prepare_changelog.sh +++ b/scripts/prepare_changelog.sh @@ -12,7 +12,8 @@ is_doc_pr(){ return 1 fi PR_NUM=$1 - out=$(curl -fsS "https://api.github.com/repos/hashicorp/packer/issues/${PR_NUM}" | jq '[.labels[].name == "docs"] | any') + out=$(curl -fsS "https://api.github.com/repos/hashicorp/packer/issues/${PR_NUM}" \ + | jq '[.labels[].name == "docs" or .labels[].name == "tech-debt"] | any') exy="$?" if [ $exy -ne 0 ]; then echo "bad response from github" From 2bdca997acd6616ffdafeff04c8210ae77438503 Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Wed, 12 Feb 2020 12:25:54 -0500 Subject: [PATCH 2/2] Update function name --- scripts/prepare_changelog.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/prepare_changelog.sh b/scripts/prepare_changelog.sh index 658e0dd06..87af3cac9 100755 --- a/scripts/prepare_changelog.sh +++ b/scripts/prepare_changelog.sh @@ -5,7 +5,7 @@ DO_PR_CHECK=1 set -o pipefail -is_doc_pr(){ +is_doc_or_tech_debt_pr(){ if ! (($+commands[jq])); then DO_PR_CHECK=0 echo "jq not found" @@ -39,16 +39,16 @@ get_prs(){ fi done | while read PR_NUM do - if (($DO_PR_CHECK)) && is_doc_pr $PR_NUM; then + if (($DO_PR_CHECK)) && is_doc_or_tech_debt_pr $PR_NUM; then continue fi echo "https://github.com/hashicorp/packer/pull/${PR_NUM}" done } -#is_doc_pr 52061111 -# is_doc_pr 5206 # non-doc pr -#is_doc_pr 5434 # doc pr +#is_doc_or_tech_debt_pr 52061111 +# is_doc_or_tech_debt_pr 5206 # non-doc pr +#is_doc_or_tech_debt_pr 5434 # doc pr #echo $? #exit