https://github.com/dtaivpp/ghripper
A tool for finding and replacing text in a swath of github repos.
https://github.com/dtaivpp/ghripper
Last synced: 12 days ago
JSON representation
A tool for finding and replacing text in a swath of github repos.
- Host: GitHub
- URL: https://github.com/dtaivpp/ghripper
- Owner: dtaivpp
- License: apache-2.0
- Created: 2021-11-24T17:51:28.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-10T15:14:03.000Z (over 4 years ago)
- Last Synced: 2025-11-19T23:03:31.593Z (7 months ago)
- Language: Python
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Ripper
GH Ripper is a utility for doing mass updates to github repos. It will find and replace text in any number of repositories and can commit them up to a new branch automatically.
## Usage
1. Install with pip `pip install ghripper`
2. (Optional) you can either export an environment variable named "GH_TOKEN" or include it in a local .env file to ensure you can make the most requests. See ["Creating a personal access token"](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) for more information on how to do so.
```
usage: ghripper [-h] [-v] [-c CONFIG] [-r REPOSDIR] [--debug]
Search and replace text in GitHub repositories
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-c CONFIG, --config CONFIG
Config file for what to find and replace
-r REPOSDIR, --reposdir REPOSDIR
Where you would like the repos cloned to
--debug Set this if you would like to see verbose logging.
```
Here is a simple example:
```
# Specifying config and where we would like the repos to clone to.
ghripper -c config.yaml -r /Users/dtippett/tmp
```
Here is an example of an entry in your config file:
```yaml
dtaivpp/cloud_haiku:
scope: repo, org, user
find: "Testing code long time"
replace_with: "NO"
branch_name: "GHRipper_Replacement"
commit_message: "Testing code long time -> NO"
push: False
```
## Contributing
For how to contribute please see [CONTRIBUTING.md]("CONTRIBUTING.md").