Boost logo

Boost :

Subject: Re: [boost] [GitHub] [PR] setting default branch to 'develop'
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2015-10-28 05:50:02


On 28-Oct-15 6:20 AM, Michel Morin wrote:
> Beman Dawes wrote:
>> Is it possible to write a curl script that could make the change for all
>> libraries?
>
> Like this
>
> REPOLIST=$(curl
> https://raw.githubusercontent.com/boostorg/boost/master/.gitmodules \
> | awk -F '"' '{print $2}')
> for REPO in $REPOLIST; do
> curl --user $USERNAME:$PASSWORD \
> --data '{"name": $REPO, "default_branch":"develop"}' \
> https://api.github.com/repos/boostorg/$REPO
> done
>
> ?
> (You need to set USERNAME and PASSWORD in some way before using the command.)

I have ran the above, with some quoting fixes:

REPOLIST=$(curl https://raw.githubusercontent.com/boostorg/boost/master/.gitmodules | awk -F '"' '{print $2}')
for REPO in $REPOLIST; do curl -H "Authorization: token <redacted>" --data "{\"name\": \"$REPO\", \"default_branch\":
\"develop\"}" https://api.github.com/repos/boostorg/$REPO; done

This has updated every repo that is included in master. I've updated hana by hand.

Is this fine with everybody?

-- 
Vladimir Prus
http://vladimirprus.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk