From d02e76c6c8fea8ebb1b8b4124e2f037cdc3c6ad7 Mon Sep 17 00:00:00 2001 From: Danijel Simic Date: Sun, 19 Jun 2022 20:43:41 +0800 Subject: [PATCH] Turn future milestone into array --- create-milestone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create-milestone.sh b/create-milestone.sh index fc79966..13ac41e 100755 --- a/create-milestone.sh +++ b/create-milestone.sh @@ -71,7 +71,7 @@ else # Get all OPEN milestones with a due date newer than the current date and time MILESTONE_DATA=$( curl --silent -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/"${REPOSITORY}"/milestones?state=open\&sort=due_on\&direction=asc ) - FUTURE_MILESTONES=$( echo $MILESTONE_DATA | jq --raw-output '.[] | select((.due_on >= '\"$LOWER_BOUND_DATETIME_REF\"') and (.due_on <= '\"$UPPER_BOUND_DATETIME_REF\"'))' ) + FUTURE_MILESTONES=$( echo $MILESTONE_DATA | jq --raw-output '[ .[] | select((.due_on >= '\"$LOWER_BOUND_DATETIME_REF\"') and (.due_on <= '\"$UPPER_BOUND_DATETIME_REF\"')) ]' ) echo Future Milestones: echo "$FUTURE_MILESTONES"