Skip to content

Add automated pnpm-lock.yaml conflict resolution workflow#81

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/add-automation-for-pnpm-lock
Closed

Add automated pnpm-lock.yaml conflict resolution workflow#81
Copilot wants to merge 4 commits intomainfrom
copilot/add-automation-for-pnpm-lock

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 15, 2026

Merge conflicts in pnpm-lock.yaml are a recurring friction point in monorepo workflows. This PR adds automation to detect and resolve lockfile-only conflicts automatically.

Implementation

  • New workflow (.github/workflows/pnpm-lock-autofix.yml):

    • Triggers on PR events when lockfile or package.json changes
    • Detects merge conflicts via attempted base branch merge
    • If only pnpm-lock.yaml conflicts: regenerates via pnpm install --no-frozen-lockfile, commits, and pushes
    • If multiple files conflict: notifies with manual resolution steps
    • Fork-safe: only runs on same-repo PRs
  • Documentation:

    • Added workflow explanation with flow diagram to .github/WORKFLOWS.md
    • Added troubleshooting section to CONTRIBUTING.md

Behavior

PR with lockfile conflict → Detect conflict → Only pnpm-lock.yaml?
                                                    ↓ yes          ↓ no
                                            Auto-regenerate    Notify user
                                                    
                                            Commit & push
                                                    
                                            Comment on PR

Security: Uses github.event.pull_request.head.repo.full_name == github.repository guard to prevent execution on fork PRs.

Original prompt

创建自动化流程,防止合并分支时报错 pnpm lock 冲突


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 15, 2026 11:20
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Copilot AI changed the title [WIP] Add automation to prevent pnpm lock conflicts during merge Add automated pnpm-lock.yaml conflict resolution workflow Jan 15, 2026
Copilot AI requested a review from huangyiirene January 15, 2026 11:28
@github-actions github-actions bot added documentation Improvements or additions to documentation configuration ci/cd labels Jan 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd configuration documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants