https://github.com/patrickhulce/erised
Mirror a branch to many branches for GitHub PR isolation.
https://github.com/patrickhulce/erised
Last synced: about 1 year ago
JSON representation
Mirror a branch to many branches for GitHub PR isolation.
- Host: GitHub
- URL: https://github.com/patrickhulce/erised
- Owner: patrickhulce
- Created: 2022-10-26T15:13:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-23T21:11:41.000Z (almost 3 years ago)
- Last Synced: 2024-10-19T00:50:42.388Z (over 1 year ago)
- Language: TypeScript
- Size: 206 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# erised
Command-line utility to mirror a single, local branch containing changes to many different projects into many separate commits / branches that can be landed independently. Useful for large monorepos with strict CI isolation requirements.
## Usage
```bash
# Setup Erised.
npm install -g @patrickhulce/erised
export ERISED_GITHUB_TOKEN=
# Start a commit affecting multiple subprojects in a monorepo.
touch apps/app-a/server.js
touch apps/app-b/server.js
git checkout -b my_feature_branch
git add apps/app-a apps/app-b
git commit -m 'fix: eliminates a critical memory leak'
# Use erised to split the branch into many isolated branches automatically.
erised mirror
# Upload those branches as PRs to GitHub.
erised upload
# Need to make a change? Just edit your original branch and run mirror again.
touch apps/app-b/server.js
git add apps/app-b/server.js
git commit -m 'oops a bug!'
erised mirror
# Check in on the status of PRs and update.
erised status
erised upload
```
## Development
```bash
npm i # Install deps.
npm test # Run test scripts.
npm run build:watch # Continuously build the source files into the binary.
npm start -- mirror # Run erised with your commands.
```
## TODO
- cleanup command
- delete/cleanup branches
- merge command
- automatically merge the PRs that can be merged
- idempotent mirror (create a staging branch and only rename if there's a diff)
- `--all` flag to handle all erised-managed branches at once