Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huonw/repo-admin
Simple tools for batch github administration
https://github.com/huonw/repo-admin
Last synced: about 1 month ago
JSON representation
Simple tools for batch github administration
- Host: GitHub
- URL: https://github.com/huonw/repo-admin
- Owner: huonw
- License: apache-2.0
- Created: 2015-03-17T08:07:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-20T16:23:16.000Z (over 8 years ago)
- Last Synced: 2023-04-10T09:40:04.444Z (over 1 year ago)
- Language: Python
- Size: 133 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
Basic tools for mass-updates of certain GitHub repo settings:
- adding collaborators
- adding GitHub webhooks
- deleting GitHub webhooks based on simple filters
- naively adding a webhook to .travis.yml files**These tools require a `token` file to exist, containing a
[GitHub personal access token](https://github.com/settings/applications).**
Permissions: `repo`, `admin:repo_hook`. The token should be connected
to an account with sufficient permissions to modify the repositories.They try to be as conservative and safe as possible, but true safety
is not guaranteed: these scripts may mangle your data if misused. They
are quite simple if one wishes to verify.Be sure to check `-h` for options.
# Example
Adding a bot, and an instance of [homu] and [highfive] to 3 repos
owned by user `bar`.[homu]: https://github.com/barosl/homu
[highfive]: https://github.com/nrc/highfive```sh
BOTNAME=foo
USERNAME=bar
REPOS=baz qux quzHOMU_SECRET=abc123def456
HOMU=example.com:1000
HIGHFIVE=example.com:1001# set the bot collaborator
./add-collab.py -u $BOTNAME -o $USERNAME $REPOS# homu
# github:
./add-webhook.py -u "http://$HOMU/github" -e '*' -t 'json' -o $USERNAME -s $HOMU_SECRET $REPOS
# travis:
# assumes that the repos are in ./baz, ./qux, ./quz, and that all have
# a .travis.yml file already. It will commit and push the travis.yml
# change to origin/master.
./travis-webhook.py -u "http://$HOMU/travis" --git push $REPOS# highfive
./add-webhook.py -u "http://$HIGHFIVE/newpr.py" -e 'pull_request' -e 'issue_comment' -t 'form' -o $USERNAME $REPOS
```