https://github.com/armand-sauzay/scribes
Apply sweeping changes to all repositories
https://github.com/armand-sauzay/scribes
api cli github python
Last synced: about 1 year ago
JSON representation
Apply sweeping changes to all repositories
- Host: GitHub
- URL: https://github.com/armand-sauzay/scribes
- Owner: armand-sauzay
- License: mit
- Created: 2023-10-13T01:44:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-13T14:22:12.000Z (almost 2 years ago)
- Last Synced: 2025-03-21T19:45:08.734Z (over 1 year ago)
- Topics: api, cli, github, python
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scribes
Scribes is a distributed refactoring tool that enables you to clone repositories and apply sweeping changes.
## Getting started
### Pre-requisites
Scribes relies on git and the [GitHub cli](https://github.com/cli/cli) (gh). You
can follow install instructions for gh [here](https://github.com/cli/cli). You
can then authenticate using `gh auth login`.
### Usage
Let's say you want to clone all repos in an organization and apply pre-commit autoupdate to all repos.
1. `pip install scribes`
2. Run the following commands
```bash
scribes search
scribes filter --contains-file .pre-commit-config.yaml
scribes clone --limit 10
scribes run "git branch"
scribes run "git checkout -b pre-commit-autoupdate"
scribes run "pre-commit autoupdate"
scribes run "git add .pre-commit-config.yaml"
scribes run "git commit -m 'chore: autoupdate pre-commit'"
scribes run "git push origin pre-commit-autoupdate"
scribes run "gh pr create --title 'chore: autoupdate pre-commit' --body 'Autoupdate pre-commit' --base main --head pre-commit-autoupdate"
```
🎉 There it is, you have created PRs to autoupdate pre-commit in all repos that contain a `.pre-commit-config.yaml` file.
### To be implemented
- [] Filter functionalities outside of --contains-file
- [] Add visualization
- [] Create documentation to apply commands to only modified repositories (like `gh pr create` commands)
- [] Encapsulate typical workflow commands (like the one above) in a single command