cherrypick-interactive 1.13.2 โ 1.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -361
- package/cli.js +0 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,22 +27,18 @@ No manual `git log` diffing. No risky merges. No guesswork.
|
|
|
27
27
|
- ๐ Finds commits in `dev` not present in `main`
|
|
28
28
|
- ๐๏ธ Lets you select which commits to cherry-pick (or pick all)
|
|
29
29
|
- ๐ช Cherry-picks in the correct order (oldest โ newest)
|
|
30
|
-
- โ๏ธ **Interactive conflict resolution wizard** with multiple strategies
|
|
30
|
+
- โ๏ธ [**Interactive conflict resolution wizard**](docs/conflict-resolution.md) with multiple strategies
|
|
31
31
|
- ๐ฏ **Preserves exact commit messages** from squashed commits
|
|
32
|
-
- ๐ช Detects **semantic version bump**
|
|
32
|
+
- ๐ช Detects [**semantic version bump**](docs/semantic-versioning.md) from conventional commits
|
|
33
33
|
- ๐งฉ Creates a `release/x.y.z` branch from `main`
|
|
34
34
|
- ๐งพ Generates a Markdown changelog from commits
|
|
35
|
-
- ๐
|
|
36
|
-
- ๐ฅ๏ธ Rich **TUI dashboard** with diff preview, search, and keyboard shortcuts
|
|
37
|
-
- ๐ค **CI mode** for fully non-interactive pipeline execution
|
|
38
|
-
- โฉ๏ธ **Undo / rollback** with checkpoint-based session recovery
|
|
39
|
-
- ๐ **Changelog preview** before cherry-pick
|
|
35
|
+
- ๐ [**Tracker integration**](docs/tracker-integration.md) โ links ticket IDs to ClickUp, Jira, Linear, or custom
|
|
36
|
+
- ๐ฅ๏ธ Rich [**TUI dashboard**](docs/tui-dashboard.md) with diff preview, search, and keyboard shortcuts
|
|
37
|
+
- ๐ค [**CI mode**](docs/ci-mode.md) for fully non-interactive pipeline execution
|
|
38
|
+
- โฉ๏ธ [**Undo / rollback**](docs/undo-rollback.md) with checkpoint-based session recovery
|
|
39
|
+
- ๐ **Changelog preview** before cherry-pick starts
|
|
40
40
|
- โ ๏ธ **Dependency detection** warns when selected commits depend on unselected ones
|
|
41
|
-
- ๐พ **Profiles** to save and reuse CLI flag combinations
|
|
42
|
-
- ๐งฐ Optionally:
|
|
43
|
-
- updates `package.json` version
|
|
44
|
-
- commits and pushes it
|
|
45
|
-
- opens a **GitHub PR** (draft or normal)
|
|
41
|
+
- ๐พ [**Profiles**](docs/profiles.md) to save and reuse CLI flag combinations
|
|
46
42
|
|
|
47
43
|
---
|
|
48
44
|
|
|
@@ -73,77 +69,38 @@ cherrypick-interactive \
|
|
|
73
69
|
3. Let you select which to cherry-pick (TUI dashboard with diff preview)
|
|
74
70
|
4. Detect potential dependencies between commits
|
|
75
71
|
5. Show a changelog preview with version bump info
|
|
76
|
-
6.
|
|
77
|
-
7.
|
|
78
|
-
8.
|
|
79
|
-
9.
|
|
80
|
-
10. Push the branch and open a **draft PR** on GitHub
|
|
72
|
+
6. Create `release/<next-version>` from `main`
|
|
73
|
+
7. Cherry-pick the selected commits (with conflict resolution if needed)
|
|
74
|
+
8. Update your `package.json` version and commit it
|
|
75
|
+
9. Push the branch and open a **draft PR** on GitHub
|
|
81
76
|
|
|
82
77
|
---
|
|
83
78
|
|
|
84
79
|
## ๐งฉ Common Use Cases
|
|
85
80
|
|
|
86
|
-
### 1. Compare branches manually
|
|
87
|
-
|
|
88
81
|
```bash
|
|
82
|
+
# Compare branches (default: origin/dev vs origin/main, last week)
|
|
89
83
|
cherrypick-interactive
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Lists commits in `origin/dev` that aren't in `origin/main`, filtered by the last week.
|
|
93
84
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
```bash
|
|
85
|
+
# Pick everything, no prompts
|
|
97
86
|
cherrypick-interactive --all-yes
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### 3. Preview changes without applying them
|
|
101
87
|
|
|
102
|
-
|
|
88
|
+
# Preview without applying
|
|
103
89
|
cherrypick-interactive --dry-run
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### 4. Filter commits by pattern
|
|
107
90
|
|
|
108
|
-
|
|
91
|
+
# Filter out noise
|
|
109
92
|
cherrypick-interactive --ignore-commits "^chore\(deps\)|^ci:"
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Excludes commits starting with `chore(deps)` or `ci:` from the selection list.
|
|
113
|
-
|
|
114
|
-
### 5. Ignore certain commits from semantic versioning
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
cherrypick-interactive --ignore-semver "bump|dependencies"
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Treats commits containing "bump" or "dependencies" as chores (no version bump).
|
|
121
|
-
|
|
122
|
-
### 6. Use a saved profile
|
|
123
93
|
|
|
124
|
-
|
|
125
|
-
# Save your flags once
|
|
126
|
-
cherrypick-interactive --save-profile hotfix --dev origin/develop --main origin/release --since "2 weeks ago"
|
|
127
|
-
|
|
128
|
-
# Reuse anytime
|
|
94
|
+
# Use a saved profile
|
|
129
95
|
cherrypick-interactive --profile hotfix
|
|
130
|
-
```
|
|
131
96
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
```bash
|
|
97
|
+
# Run in CI/CD
|
|
135
98
|
cherrypick-interactive --ci --conflict-strategy theirs --format json > result.json
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### 8. Link ticket IDs in changelog
|
|
139
99
|
|
|
140
|
-
|
|
100
|
+
# Link ticket IDs in changelog
|
|
141
101
|
cherrypick-interactive --tracker clickup --tracker-url "https://app.clickup.com/t/{{id}}"
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### 9. Undo the last cherry-pick session
|
|
145
102
|
|
|
146
|
-
|
|
103
|
+
# Undo the last session
|
|
147
104
|
cherrypick-interactive --undo
|
|
148
105
|
```
|
|
149
106
|
|
|
@@ -155,245 +112,77 @@ cherrypick-interactive --undo
|
|
|
155
112
|
|
|
156
113
|
| Flag | Description | Default |
|
|
157
114
|
|------|--------------|----------|
|
|
158
|
-
| `--dev` | Source branch
|
|
159
|
-
| `--main` | Target branch
|
|
160
|
-
| `--since` |
|
|
115
|
+
| `--dev` | Source branch | `origin/dev` |
|
|
116
|
+
| `--main` | Target branch | `origin/main` |
|
|
117
|
+
| `--since` | Time window (e.g. `"2 weeks ago"`) | `1 week ago` |
|
|
161
118
|
| `--no-fetch` | Skip `git fetch --prune` | `false` |
|
|
162
|
-
| `--all-yes` | Cherry-pick all
|
|
163
|
-
| `--ignore-commits` |
|
|
119
|
+
| `--all-yes` | Cherry-pick all without prompt | `false` |
|
|
120
|
+
| `--ignore-commits` | Regex patterns to exclude commits | โ |
|
|
164
121
|
|
|
165
122
|
### Version options
|
|
166
123
|
|
|
167
124
|
| Flag | Description | Default |
|
|
168
125
|
|------|--------------|----------|
|
|
169
|
-
| `--semantic-versioning` |
|
|
170
|
-
| `--current-version` | Current version
|
|
171
|
-
| `--version-file` | Path to `package.json`
|
|
172
|
-
| `--version-commit-message` |
|
|
173
|
-
| `--ignore-semver` |
|
|
126
|
+
| `--semantic-versioning` | Auto-detect version bump | `true` |
|
|
127
|
+
| `--current-version` | Current X.Y.Z version | โ |
|
|
128
|
+
| `--version-file` | Path to `package.json` | `./package.json` |
|
|
129
|
+
| `--version-commit-message` | Commit message template | `chore(release): bump version to {{version}}` |
|
|
130
|
+
| `--ignore-semver` | Regex patterns to ignore for semver | โ |
|
|
174
131
|
|
|
175
132
|
### Release options
|
|
176
133
|
|
|
177
134
|
| Flag | Description | Default |
|
|
178
135
|
|------|--------------|----------|
|
|
179
|
-
| `--create-release` | Create
|
|
180
|
-
| `--push-release` | Push
|
|
181
|
-
| `--draft-pr` | Create
|
|
182
|
-
|
|
183
|
-
### CI options
|
|
184
|
-
|
|
185
|
-
| Flag | Description | Default |
|
|
186
|
-
|------|--------------|----------|
|
|
187
|
-
| `--ci` | Enable fully non-interactive mode | `false` |
|
|
188
|
-
| `--conflict-strategy` | How to handle conflicts: `fail`, `ours`, `theirs`, `skip` | `fail` |
|
|
189
|
-
| `--format` | Output format: `text` or `json` | `text` |
|
|
190
|
-
| `--dependency-strategy` | How to handle dependencies: `warn`, `fail`, `ignore` | `warn` |
|
|
136
|
+
| `--create-release` | Create release branch | `true` |
|
|
137
|
+
| `--push-release` | Push and create PR | `true` |
|
|
138
|
+
| `--draft-pr` | Create PR as draft | `false` |
|
|
191
139
|
|
|
192
|
-
###
|
|
140
|
+
### CI options โ [detailed docs](docs/ci-mode.md)
|
|
193
141
|
|
|
194
142
|
| Flag | Description | Default |
|
|
195
143
|
|------|--------------|----------|
|
|
196
|
-
| `--
|
|
197
|
-
| `--
|
|
198
|
-
| `--
|
|
144
|
+
| `--ci` | Non-interactive mode | `false` |
|
|
145
|
+
| `--conflict-strategy` | `fail`, `ours`, `theirs`, `skip` | `fail` |
|
|
146
|
+
| `--format` | `text` or `json` | `text` |
|
|
147
|
+
| `--dependency-strategy` | `warn`, `fail`, `ignore` | `warn` |
|
|
199
148
|
|
|
200
|
-
###
|
|
149
|
+
### Tracker options โ [detailed docs](docs/tracker-integration.md)
|
|
201
150
|
|
|
202
151
|
| Flag | Description | Default |
|
|
203
152
|
|------|--------------|----------|
|
|
204
|
-
| `--
|
|
205
|
-
| `--
|
|
206
|
-
| `--
|
|
153
|
+
| `--tracker` | Preset: `clickup`, `jira`, `linear` | โ |
|
|
154
|
+
| `--ticket-pattern` | Custom regex (one capture group) | โ |
|
|
155
|
+
| `--tracker-url` | URL template with `{{id}}` | โ |
|
|
207
156
|
|
|
208
|
-
###
|
|
157
|
+
### Profile options โ [detailed docs](docs/profiles.md)
|
|
209
158
|
|
|
210
159
|
| Flag | Description | Default |
|
|
211
160
|
|------|--------------|----------|
|
|
212
|
-
| `--
|
|
161
|
+
| `--profile` | Load named profile | โ |
|
|
162
|
+
| `--save-profile` | Save flags as profile | โ |
|
|
163
|
+
| `--list-profiles` | List profiles and exit | `false` |
|
|
213
164
|
|
|
214
|
-
###
|
|
165
|
+
### Other options
|
|
215
166
|
|
|
216
167
|
| Flag | Description | Default |
|
|
217
168
|
|------|--------------|----------|
|
|
218
|
-
| `--
|
|
219
|
-
| `--
|
|
169
|
+
| `--undo` | [Rollback](docs/undo-rollback.md) to pre-cherry-pick state | `false` |
|
|
170
|
+
| `--no-tui` | Disable [TUI dashboard](docs/tui-dashboard.md), use simple checkbox | `false` |
|
|
171
|
+
| `--dry-run` | Preview without applying | `false` |
|
|
220
172
|
|
|
221
173
|
---
|
|
222
174
|
|
|
223
|
-
##
|
|
175
|
+
## ๐ Detailed Documentation
|
|
224
176
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
|
228
|
-
|
|
229
|
-
|
|
|
230
|
-
|
|
|
231
|
-
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
cherrypick-interactive --ignore-semver "^chore\(deps\)|bump|merge"
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
## โ๏ธ Interactive Conflict Resolution
|
|
242
|
-
|
|
243
|
-
When cherry-picking encounters conflicts, the tool provides an **interactive wizard**:
|
|
244
|
-
|
|
245
|
-
### Conflict Resolution Options:
|
|
246
|
-
|
|
247
|
-
**Per-file resolution:**
|
|
248
|
-
- **Use ours** โ Keep the current branch's version
|
|
249
|
-
- **Use theirs** โ Accept the cherry-picked commit's version
|
|
250
|
-
- **Open in editor** โ Manually resolve conflicts in your editor
|
|
251
|
-
- **Show diff** โ View the conflicting changes
|
|
252
|
-
- **Mark resolved** โ Stage the file as-is
|
|
253
|
-
|
|
254
|
-
**Bulk actions:**
|
|
255
|
-
- **Use ours for ALL** โ Apply current branch's version to all conflicts
|
|
256
|
-
- **Use theirs for ALL** โ Accept cherry-picked version for all conflicts
|
|
257
|
-
- **Stage ALL** โ Mark all files as resolved
|
|
258
|
-
- **Launch mergetool** โ Use Git's configured merge tool
|
|
259
|
-
|
|
260
|
-
In CI mode, `--conflict-strategy` handles conflicts automatically (`ours`, `theirs`, `skip`, or `fail`).
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
## ๐ฅ๏ธ TUI Dashboard
|
|
265
|
-
|
|
266
|
-
The commit selection screen features a rich terminal UI:
|
|
267
|
-
|
|
268
|
-
- **Arrow keys / j/k** โ Navigate commits
|
|
269
|
-
- **Space** โ Toggle selection
|
|
270
|
-
- **a / n** โ Select all / deselect all
|
|
271
|
-
- **/** โ Search/filter commits by message
|
|
272
|
-
- **d** โ Full diff overlay (Esc to return)
|
|
273
|
-
- **p** โ Toggle preview pane
|
|
274
|
-
- **Enter** โ Confirm selection
|
|
275
|
-
- **q** โ Quit (with confirmation if commits are selected)
|
|
276
|
-
|
|
277
|
-
Each commit shows its hash, subject, and relative date. Selected commits are highlighted in green.
|
|
278
|
-
|
|
279
|
-
Falls back to simple `inquirer` checkbox on: Windows, small terminals, CI, or with `--no-tui`.
|
|
280
|
-
|
|
281
|
-
---
|
|
282
|
-
|
|
283
|
-
## ๐พ Profiles
|
|
284
|
-
|
|
285
|
-
Save and reuse CLI flag combinations:
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
# Save
|
|
289
|
-
cherrypick-interactive --save-profile hotfix --dev origin/develop --main origin/release --since "2 weeks ago"
|
|
290
|
-
|
|
291
|
-
# Use
|
|
292
|
-
cherrypick-interactive --profile hotfix
|
|
293
|
-
|
|
294
|
-
# Override a single flag
|
|
295
|
-
cherrypick-interactive --profile hotfix --since "3 days ago"
|
|
296
|
-
|
|
297
|
-
# List all profiles
|
|
298
|
-
cherrypick-interactive --list-profiles
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
Config stored in `.cherrypickrc.json`:
|
|
302
|
-
|
|
303
|
-
```json
|
|
304
|
-
{
|
|
305
|
-
"profiles": {
|
|
306
|
-
"hotfix": {
|
|
307
|
-
"dev": "origin/develop",
|
|
308
|
-
"main": "origin/release",
|
|
309
|
-
"since": "2 weeks ago"
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
"tracker": {
|
|
313
|
-
"ticket-pattern": "#([a-z0-9]+)",
|
|
314
|
-
"tracker-url": "https://app.clickup.com/t/{{id}}"
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
## ๐ Tracker Integration
|
|
322
|
-
|
|
323
|
-
Link ticket IDs in your changelog to your issue tracker:
|
|
324
|
-
|
|
325
|
-
```bash
|
|
326
|
-
# Built-in presets
|
|
327
|
-
cherrypick-interactive --tracker clickup --tracker-url "https://app.clickup.com/t/{{id}}"
|
|
328
|
-
cherrypick-interactive --tracker jira --tracker-url "https://team.atlassian.net/browse/{{id}}"
|
|
329
|
-
cherrypick-interactive --tracker linear --tracker-url "https://linear.app/my-team/issue/{{id}}"
|
|
330
|
-
|
|
331
|
-
# Custom pattern
|
|
332
|
-
cherrypick-interactive --ticket-pattern "#([a-z0-9]+)" --tracker-url "https://app.clickup.com/t/{{id}}"
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
Commit `#86c8w62wx - Fix login bug` becomes `[#86c8w62wx](https://app.clickup.com/t/86c8w62wx) - Fix login bug` in the changelog.
|
|
336
|
-
|
|
337
|
-
---
|
|
338
|
-
|
|
339
|
-
## ๐ค CI Mode
|
|
340
|
-
|
|
341
|
-
Run fully non-interactive in CI/CD pipelines:
|
|
342
|
-
|
|
343
|
-
```bash
|
|
344
|
-
cherrypick-interactive --ci --conflict-strategy theirs --format json > result.json
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
**Exit codes:**
|
|
348
|
-
|
|
349
|
-
| Code | Meaning |
|
|
350
|
-
|------|---------|
|
|
351
|
-
| `0` | Success |
|
|
352
|
-
| `1` | Conflict (with `--conflict-strategy fail`) |
|
|
353
|
-
| `2` | No commits found |
|
|
354
|
-
| `3` | Auth / push error |
|
|
355
|
-
| `4` | Dependency issue (with `--dependency-strategy fail`) |
|
|
356
|
-
|
|
357
|
-
**JSON output** goes to stdout, all logs go to stderr. Colors auto-disabled in JSON mode.
|
|
358
|
-
|
|
359
|
-
---
|
|
360
|
-
|
|
361
|
-
## โฉ๏ธ Undo / Rollback
|
|
362
|
-
|
|
363
|
-
Made a mistake? Roll back the entire cherry-pick session:
|
|
364
|
-
|
|
365
|
-
```bash
|
|
366
|
-
cherrypick-interactive --undo
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
- Checkpoint saved automatically before each session
|
|
370
|
-
- Validates branch integrity before reset (ancestor check + divergence detection)
|
|
371
|
-
- Uses `--force-with-lease` (not `--force`)
|
|
372
|
-
- Option to re-open commit selection after undo
|
|
373
|
-
|
|
374
|
-
---
|
|
375
|
-
|
|
376
|
-
## ๐งน Why This Helps
|
|
377
|
-
|
|
378
|
-
If your team:
|
|
379
|
-
- Rebases or cherry-picks from `dev` โ `main`
|
|
380
|
-
- Uses temporary release branches
|
|
381
|
-
- Works with squashed commits
|
|
382
|
-
- Needs to handle merge conflicts gracefully
|
|
383
|
-
- Tracks semantic versions via commits
|
|
384
|
-
|
|
385
|
-
โฆthis CLI saves time and reduces errors.
|
|
386
|
-
It automates a tedious, error-prone manual process into a single command that behaves like `yarn upgrade-interactive`, but for Git commits.
|
|
387
|
-
|
|
388
|
-
**Special features:**
|
|
389
|
-
- โ
Preserves exact commit messages (critical for squashed commits)
|
|
390
|
-
- โ
Interactive conflict resolution without leaving the terminal
|
|
391
|
-
- โ
Smart pattern-based filtering for commits and version detection
|
|
392
|
-
- โ
Automatic changelog generation with ticket linking
|
|
393
|
-
- โ
TUI dashboard with diff preview and keyboard shortcuts
|
|
394
|
-
- โ
CI mode with structured JSON output and distinct exit codes
|
|
395
|
-
- โ
Undo/rollback with safety checks
|
|
396
|
-
- โ
Reusable profiles for common workflows
|
|
177
|
+
| Topic | Description |
|
|
178
|
+
|-------|-------------|
|
|
179
|
+
| [โ๏ธ Conflict Resolution](docs/conflict-resolution.md) | Per-file and bulk conflict resolution, CI strategies |
|
|
180
|
+
| [๐ง Semantic Versioning](docs/semantic-versioning.md) | Conventional commits, version sources, ignore patterns |
|
|
181
|
+
| [๐ฅ๏ธ TUI Dashboard](docs/tui-dashboard.md) | Keyboard shortcuts, diff preview, search, fallback behavior |
|
|
182
|
+
| [๐พ Profiles](docs/profiles.md) | Save/load/list profiles, config file format, CI usage |
|
|
183
|
+
| [๐ Tracker Integration](docs/tracker-integration.md) | ClickUp, Jira, Linear presets, custom patterns |
|
|
184
|
+
| [๐ค CI Mode](docs/ci-mode.md) | Exit codes, JSON output, GitHub Actions example |
|
|
185
|
+
| [โฉ๏ธ Undo / Rollback](docs/undo-rollback.md) | Checkpoint system, safety checks, limitations |
|
|
397
186
|
|
|
398
187
|
---
|
|
399
188
|
|
|
@@ -402,59 +191,16 @@ It automates a tedious, error-prone manual process into a single command that be
|
|
|
402
191
|
- Node.js โฅ 20
|
|
403
192
|
- Git โฅ 2.0
|
|
404
193
|
- **GitHub CLI (`gh`)** โ *Optional, only required if using `--push-release`*
|
|
405
|
-
- Install from: https://cli.github.com/
|
|
406
|
-
- The tool will check if `gh` is installed and offer to continue without it
|
|
407
|
-
- A clean working directory (no uncommitted changes)
|
|
408
194
|
|
|
409
195
|
---
|
|
410
196
|
|
|
411
197
|
## ๐ฏ Best Practices
|
|
412
198
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
Exclude CI updates, dependency bumps, and merge commits from selection.
|
|
420
|
-
|
|
421
|
-
### 2. Use `--ignore-semver` for version accuracy
|
|
422
|
-
|
|
423
|
-
```bash
|
|
424
|
-
cherrypick-interactive --ignore-semver "bump|dependencies|merge"
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
Prevent certain commits from affecting semantic version calculation.
|
|
428
|
-
|
|
429
|
-
### 3. Always use `--draft-pr` for review
|
|
430
|
-
|
|
431
|
-
```bash
|
|
432
|
-
cherrypick-interactive --draft-pr
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
Creates draft PRs so your team can review before merging.
|
|
436
|
-
|
|
437
|
-
### 4. Test with `--dry-run` first
|
|
438
|
-
|
|
439
|
-
```bash
|
|
440
|
-
cherrypick-interactive --dry-run
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
See what would happen without making any changes.
|
|
444
|
-
|
|
445
|
-
### 5. Save your workflow as a profile
|
|
446
|
-
|
|
447
|
-
```bash
|
|
448
|
-
cherrypick-interactive --save-profile release --dev origin/dev --main origin/main --since "1 month ago" --draft-pr
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
Then just run `cherrypick-interactive --profile release` every time.
|
|
452
|
-
|
|
453
|
-
---
|
|
454
|
-
|
|
455
|
-
## ๐งพ License
|
|
456
|
-
|
|
457
|
-
**MIT** โ free to use, modify, and distribute.
|
|
199
|
+
1. **Filter noise:** `--ignore-commits "^ci:|^chore\(deps\):|Merge branch"`
|
|
200
|
+
2. **Version accuracy:** `--ignore-semver "bump|dependencies|merge"`
|
|
201
|
+
3. **Review first:** `--draft-pr`
|
|
202
|
+
4. **Test first:** `--dry-run`
|
|
203
|
+
5. **Save your workflow:** `--save-profile release --dev origin/dev --main origin/main --since "1 month ago"`
|
|
458
204
|
|
|
459
205
|
---
|
|
460
206
|
|
|
@@ -462,56 +208,27 @@ Then just run `cherrypick-interactive --profile release` every time.
|
|
|
462
208
|
|
|
463
209
|
1. Clone the repo
|
|
464
210
|
2. Install dependencies: `yarn install`
|
|
465
|
-
3. Run locally:
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
```
|
|
469
|
-
4. Run tests:
|
|
470
|
-
```bash
|
|
471
|
-
yarn test
|
|
472
|
-
```
|
|
473
|
-
5. Test edge cases before submitting PRs:
|
|
474
|
-
- Squashed commits with conflicts
|
|
475
|
-
- Empty cherry-picks
|
|
476
|
-
- Multiple conflict resolutions
|
|
477
|
-
6. Please follow Conventional Commits for your changes.
|
|
211
|
+
3. Run locally: `node cli.js --dry-run`
|
|
212
|
+
4. Run tests: `yarn test`
|
|
213
|
+
5. Follow Conventional Commits for your changes.
|
|
478
214
|
|
|
479
215
|
---
|
|
480
216
|
|
|
481
217
|
## ๐ Troubleshooting
|
|
482
218
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
-
|
|
219
|
+
| Problem | Solution |
|
|
220
|
+
|---------|----------|
|
|
221
|
+
| GitHub CLI not installed | Install from https://cli.github.com/ or use `--no-push-release` |
|
|
222
|
+
| Cherry-pick has conflicts | Use the [interactive wizard](docs/conflict-resolution.md) or `--conflict-strategy` in CI |
|
|
223
|
+
| Version not detected correctly | Use `--ignore-semver "bump\|chore\(deps\)"` |
|
|
224
|
+
| Too many commits | Use `--ignore-commits` or `--since "3 days ago"` |
|
|
225
|
+
| Want to undo | `cherrypick-interactive --undo` ([details](docs/undo-rollback.md)) |
|
|
487
226
|
|
|
488
|
-
|
|
489
|
-
```bash
|
|
490
|
-
cherrypick-interactive --create-release --no-push-release
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
### "Cherry-pick has conflicts"
|
|
494
|
-
Use the interactive wizard to resolve conflicts file-by-file or in bulk. In CI, use `--conflict-strategy`.
|
|
495
|
-
|
|
496
|
-
### "Commit message changed after conflict resolution"
|
|
497
|
-
This issue has been fixed! The tool now preserves the original commit message using `git commit -C <hash>`.
|
|
498
|
-
|
|
499
|
-
### "Version not detected correctly"
|
|
500
|
-
Use `--ignore-semver` to exclude commits that shouldn't affect versioning:
|
|
501
|
-
```bash
|
|
502
|
-
cherrypick-interactive --ignore-semver "bump|chore\(deps\)"
|
|
503
|
-
```
|
|
227
|
+
---
|
|
504
228
|
|
|
505
|
-
|
|
506
|
-
Use `--ignore-commits` to filter out noise, or adjust `--since` to a shorter time window:
|
|
507
|
-
```bash
|
|
508
|
-
cherrypick-interactive --since "3 days ago" --ignore-commits "^ci:|^docs:"
|
|
509
|
-
```
|
|
229
|
+
## ๐งพ License
|
|
510
230
|
|
|
511
|
-
|
|
512
|
-
```bash
|
|
513
|
-
cherrypick-interactive --undo
|
|
514
|
-
```
|
|
231
|
+
**MIT** โ free to use, modify, and distribute.
|
|
515
232
|
|
|
516
233
|
---
|
|
517
234
|
|
package/cli.js
CHANGED
|
@@ -1502,25 +1502,6 @@ async function main() {
|
|
|
1502
1502
|
}
|
|
1503
1503
|
|
|
1504
1504
|
// Confirmation (skip in CI)
|
|
1505
|
-
if (!argv.ci && !argv['all-yes']) {
|
|
1506
|
-
// Flush stdin buffer to prevent TUI's Enter keypress from leaking into this prompt
|
|
1507
|
-
await new Promise((r) => setTimeout(r, 100));
|
|
1508
|
-
if (process.stdin.readable) process.stdin.read();
|
|
1509
|
-
|
|
1510
|
-
const { proceed } = await prompt([
|
|
1511
|
-
{
|
|
1512
|
-
type: 'confirm',
|
|
1513
|
-
name: 'proceed',
|
|
1514
|
-
message: 'Proceed with cherry-pick?',
|
|
1515
|
-
default: true,
|
|
1516
|
-
},
|
|
1517
|
-
]);
|
|
1518
|
-
if (!proceed) {
|
|
1519
|
-
log(chalk.yellow('Aborted by user.'));
|
|
1520
|
-
return;
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
1505
|
if (argv.ci) {
|
|
1525
1506
|
err(chalk.gray('[CI] Changelog preview logged. Proceeding automatically.'));
|
|
1526
1507
|
}
|
package/package.json
CHANGED