Ricordanza
1/25/2018 - 9:26 AM

Script to complete backlog challenge

Script to complete backlog challenge

#!/bin/bash

BACKLOG_API_KEY="<apikey here>"
BACKLOG_SPACE="<space name here>"
BACKLOG_PROJECT="<project name here>"

# Change the argument of seq according to the number of tickets
for i in `seq 1 1000`; do
    # It may be backlog.com
    result=`curl -s -X PATCH https://${BACKLOG_SPACE}.backlog.jp/api/v2/issues/${BACKLOG_PROJECT}-${i}?apiKey=${BACKLOG_API_KEY} -d "comment=close&statusId=4"`
    echo $result
    sleep 0.1s
done

exit 0