You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/WORKFLOWS.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -338,6 +338,67 @@ Add these badges to show workflow status:
338
338
3. Update documentation
339
339
4. Monitor first few runs after changes
340
340
341
+
## Automatic Lockfile Merge Resolution
342
+
343
+
### Overview
344
+
345
+
The repository is configured to automatically resolve merge conflicts in `pnpm-lock.yaml` using a custom Git merge driver. This prevents manual intervention when lockfile conflicts occur during branch merges or automated workflows.
346
+
347
+
### How It Works
348
+
349
+
**Repository Configuration** (`.gitattributes`):
350
+
```
351
+
pnpm-lock.yaml merge=pnpm-merge
352
+
```
353
+
354
+
This tells Git to use the `pnpm-merge` driver when merging `pnpm-lock.yaml` files.
355
+
356
+
**Workflow Configuration** (Applied in CI workflows):
357
+
```yaml
358
+
- name: Configure Git merge driver for pnpm-lock.yaml
359
+
run: |
360
+
# Configure custom merge driver for pnpm-lock.yaml
361
+
# This allows Git to automatically resolve lockfile conflicts by regenerating it
This configuration is active in the following workflows:
369
+
- **Changeset Release** (`changeset-release.yml`): Handles lockfile updates during version bumping
370
+
- **Auto Changelog** (`changelog.yml`): Prevents conflicts during automated changelog updates
371
+
372
+
### Adding to New Workflows
373
+
374
+
If you create a workflow that performs git merge operations or might encounter lockfile conflicts, add the configuration step **after checkout** and **before any merge operation**:
375
+
376
+
```yaml
377
+
steps:
378
+
- name: Checkout code
379
+
uses: actions/checkout@v4
380
+
with:
381
+
fetch-depth: 0
382
+
383
+
- name: Configure Git merge driver for pnpm-lock.yaml
0 commit comments