Skip to content

Commit 809caf9

Browse files
chore: Address coderabbitai's comments
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Generated-by: Cursor AI
1 parent f2e4837 commit 809caf9

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.claude/skills/add-rebase-rules/SKILL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ Important:
6767
- add `elif` branch calling `apply_package_changes_by_path "$conflictingFile"` (or equivalent existing pattern).
6868
- For non-JSON replace rules:
6969
- use `apply_changes "$conflictingFile"` for line-based replacements.
70-
- use `apply_changes_multi_line "$conflictingFile"` when multiline replacement is required.
70+
- For multiline replacements, `rebase.sh` has **two** handlers — do not always default to one:
71+
- `apply_changes_multi_line "$conflictingFile"` — higher-level wrapper that resets the file (`git checkout --theirs`), calls `apply_multi_line_replace`, then stages the result (`git add`).
72+
- `apply_multi_line_replace "$conflictingFile"` — low-level function that performs the Perl multiline replacement directly, without git checkout/add.
73+
- Before adding a routing branch, inspect the existing `resolve_conflicts` block in `rebase.sh` and look at how other files in the same area are routed. Match the handler already used for similar files. For example, if neighboring entries call `apply_multi_line_replace` directly, use that; if they use `apply_changes_multi_line`, use that instead.
7174
- Do not add duplicate branches.
7275

7376
6. Update `.rebase/CHANGELOG.md`

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Replace `che-api` with any Che extension name. Generates dependency reports in `
8585
- **`.rebase/`** — Patch management for upstream rebasing:
8686
- `add/` — Files to add to upstream
8787
- `override/` — JSON files to merge over upstream (via jq)
88-
- `replace/`Files to wholesale replace in upstream
88+
- `replace/`Per-file JSON replacement rules keyed by file path (not full file swaps). Each entry is a JSON object with `from` and `by` strings applied to the specified file path.
8989

9090
### Che-Specific Extensions (in `code/extensions/`)
9191

@@ -111,7 +111,7 @@ Nine extensions provide Kubernetes/Che integration:
111111

112112
To rebase on upstream VS Code:
113113
1. `git remote add upstream-code https://github.com/microsoft/vscode` (if not already added)
114-
2. `git fetch upstream-code main`
114+
2. `git fetch upstream-code release/<version>` — fetch the release branch that `rebase.sh` targets (check `UPSTREAM_VERSION` in `rebase.sh` for the current ref, e.g. `upstream-code/release/1.104`)
115115
3. `./rebase.sh` — Pulls subtree, applies `.rebase/` patches, updates JSON overrides
116116
4. Fix any conflicts
117117
5. `./build/artifacts/generate.sh` to update `artifacts.lock.yaml`

0 commit comments

Comments
 (0)