-
Notifications
You must be signed in to change notification settings - Fork 0
Add auto merge with lockfile fix setup #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: huangyiirene <[email protected]>
|
@copilot 继续 |
|
✅ All checks passed!
|
Co-authored-by: hotlong <[email protected]>
已完成所有实现!✅ 已添加 pnpm-lock.yaml 自动合并配置到以下工作流:
已完成文档更新:
配置验证:
提交: 6cb562d |
Co-authored-by: hotlong <[email protected]>
Co-authored-by: hotlong <[email protected]>
|
✅ All checks passed!
|
|
✅ All checks passed!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements an automated Git merge driver configuration to handle pnpm-lock.yaml conflicts in CI workflows, eliminating manual conflict resolution during automated operations.
Changes:
- Added custom merge driver configuration to three workflows that may encounter lockfile conflicts
- Updated pnpm version from 9 to 10 across workflows for consistency
- Documented the merge driver setup and usage in the workflows documentation
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/dependabot-auto-merge.yml |
Added checkout, pnpm/Node.js setup, and merge driver configuration for automated dependency updates |
.github/workflows/changeset-release.yml |
Added merge driver configuration and updated pnpm to v10 for release operations |
.github/workflows/changeset-check.yml |
Updated pnpm version to v10 for consistency |
.github/workflows/changelog.yml |
Added merge driver configuration for automated changelog updates |
.github/WORKFLOWS.md |
Added comprehensive documentation section explaining the merge driver setup, usage, and benefits |
| - name: Configure Git merge driver for pnpm-lock.yaml | ||
| run: | | ||
| # Configure custom merge driver for pnpm-lock.yaml | ||
| # This allows Git to automatically resolve lockfile conflicts by regenerating it | ||
| git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver" | ||
| git config merge.pnpm-merge.driver "pnpm install --no-frozen-lockfile" | ||
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The merge driver is configured but pnpm is not installed in this workflow. The driver command 'pnpm install --no-frozen-lockfile' will fail if triggered because there are no pnpm setup steps. Either add pnpm/Node.js setup steps before this configuration, or remove this configuration if merge operations are not expected in this workflow.
| - name: Configure Git merge driver for pnpm-lock.yaml | |
| run: | | |
| # Configure custom merge driver for pnpm-lock.yaml | |
| # This allows Git to automatically resolve lockfile conflicts by regenerating it | |
| git config merge.pnpm-merge.name "pnpm-lock.yaml merge driver" | |
| git config merge.pnpm-merge.driver "pnpm install --no-frozen-lockfile" |
| This configuration is active in the following workflows: | ||
| - **Changeset Release** (`changeset-release.yml`): Handles lockfile updates during version bumping | ||
| - **Auto Changelog** (`changelog.yml`): Prevents conflicts during automated changelog updates |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation should also mention the Dependabot Auto-merge workflow (dependabot-auto-merge.yml) since it now has the merge driver configuration as well.
| - **Auto Changelog** (`changelog.yml`): Prevents conflicts during automated changelog updates | |
| - **Auto Changelog** (`changelog.yml`): Prevents conflicts during automated changelog updates | |
| - **Dependabot Auto-merge** (`dependabot-auto-merge.yml`): Automatically resolves pnpm lockfile conflicts during Dependabot PR merges |
Implementation: Ultimate Automation for pnpm-lock.yaml Merge Conflicts
This PR implements an automated solution to handle pnpm-lock.yaml merge conflicts in CI workflows by configuring a custom Git merge driver.
Changes Made
Modified Workflows:
.github/workflows/changeset-release.yml- Added merge driver config for version bumping operations and updated pnpm to v10.github/workflows/changelog.yml- Added merge driver config for automated changelog updates.github/workflows/dependabot-auto-merge.yml- Added checkout step, pnpm/Node.js setup (v10), and merge driver config.github/workflows/changeset-check.yml- Updated pnpm to v10 for consistency across workflowsDocumentation:
5.
.github/WORKFLOWS.md- Added comprehensive "Automatic Lockfile Merge Resolution" sectionHow It Works
The solution combines repository-level configuration (
.gitattributesalready haspnpm-lock.yaml merge=pnpm-merge) with CI-level git config commands that define what the merge driver does:When a merge conflict occurs in
pnpm-lock.yaml, Git automatically runspnpm install --no-frozen-lockfileto regenerate the lockfile instead of requiring manual conflict resolution.Benefits
Testing
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.