Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.
/ ghad Public archive

GitHub administration command line tool

License

Notifications You must be signed in to change notification settings

18F/ghad

Folders and files

NameName
Last commit message
Last commit date
Mar 26, 2025
Jun 1, 2021
Aug 20, 2021
May 18, 2020
Aug 27, 2019
Aug 27, 2019
Jul 29, 2021
May 18, 2020
Sep 21, 2021
Jul 23, 2021

Repository files navigation

ghad: The GitHub Administration Tool

CircleCI

ghad ("gad") is a command-line tool for managing a large number of GitHub repositories. It currently allows you to:

It can be run manually, or set up to run from a continuous integration system - see the CircleCI configuration.

Setup

  1. Install Node.js 10+.

  2. Create a token.

  3. Clone this repository.

  4. Set your GitHub token.

    export GITHUB_TOKEN=...
  5. View the documentation.

    npx ghad --help

Example usage

  1. Run the script as a dry run.

    npx ghad archive --org <something>
  2. To actually archive repositories:

    npx ghad archive --org <something> --apply

The --org is optional. See npx ghad archive --help for more info.

Automation

See the CircleCI automation 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.

Usage in TTS

ghad is run across TTS GitHub repositories by the @tts-bot. The bot is a member of the GSA/tts-admins team. To include a repository to ghad's scope, give the GSA/tts-admins team admin access to the repository.