Skip to content

Instantly share code, notes, and snippets.

@hasufell
Created November 27, 2015 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasufell/f5472a2f72d2de5cae1b to your computer and use it in GitHub Desktop.
Save hasufell/f5472a2f72d2de5cae1b to your computer and use it in GitHub Desktop.
for i in $(curl -s -X GET http://127.0.0.1:5984/issues/_all_docs | jsawk 'return this.rows' | jsawk -n 'out(this.id)' | grep -v '^_') ; do
curl -s -X PUT http://127.0.0.1:5984/issues/${i} -d "$(curl -s -X GET http://127.0.0.1:5984/issues/${i} | jsawk 'return {_id:this._id,_rev:this._rev,number:this.number,summary:this.summary,owner:this.owner,subscribers:[],description:this.description,tags:this.tags,bundle:this.bundle,created:this.created,updated:this.updated,is_closed:this.is_closed,repository:this.repository}')"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment