ghad
v0.2.0
Published
A command-line tool for managing a large number of GitHub repositories
Downloads
4
Readme
ghad: The GitHub Administration Tool
ghad
is a command-line tool for managing a large number of GitHub repositories. It currently allows you to:
- Archive repositories that haven't been updated in a specified number of days
- Enable security alerts for vulnerable dependencies
- Enable automated security fixes
It can be run manually, or set up to run from a continuous integration system - see the CircleCI configuration.
Setup
Install Node.js 10+.
Clone this repository.
Set your GitHub token.
export GITHUB_TOKEN=...
View the documentation.
npx ghad --help
Example usage
Run the script as a dry run.
npx ghad archive --org <something>
To actually archive repositories:
npx ghad archive --org <something> --apply
The --org
is optional. See npx ghad archive --help
for more info.
Usage in TTS
ghad
is run across TTS GitHub repositories through the @tts-bot. See the CircleCI configuration.
Warning: Keep write access to this repository restricted. The associated GitHub token is that of an Owner, so being able to run arbitrary commands in CI allows privilege escalation.