#!/bin/bash
. github-secrets

organization="yast"
repolist=`./github-list-repos $organization`

for repo in $repolist
do
  json=json-${repo}
  cat > ${json} << EOJSON
  {
  "name": "email",
  "active": true,
  "config": {
    "address": "yast-commit@opensuse.org"
  }
  }
EOJSON

  curl -s -n -X POST -d @${json}  https://api.github.com/repos/${organization}/${repo}/hooks -o ${json}.result
done


