fix: do not run lunaria when making a merge commit#1440
fix: do not run lunaria when making a merge commit#1440danielroe merged 4 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughThe lunaria.ts file has been modified to include a runtime guard that prevents the lunaria build from executing during a Git merge operation. The implementation imports existsSync from the fs module and checks for the presence of a .git/MERGE_HEAD file. When a merge is detected, the build process logs a message and exits with code 0. The remainder of the build workflow, including JSON file preparation, lunaria creation, and HTML/status generation, remains structurally unchanged. 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
I've found that running |
|
Yes, but some people strongly prefer |
yea it works, it'd just be nice if the hooks wouldn't break in that case since I think merge is "more correct" (and certainly easier) |
| }, | ||
| "simple-git-hooks": { | ||
| "pre-commit": "npx lint-staged" | ||
| "pre-commit": "[ -n \"$NO_VERIFY\" ] && exit 0\nnpx lint-staged" |
There was a problem hiding this comment.
is there any worry about this potentially not working on Windows? I don't have a windows machine to test it unfortunately
There was a problem hiding this comment.
I use Windows, everything works 😅
It is standard POSIX shell, should work properly on all systems
|
passing an env variable seems like just as much work. in honesty, what if we update lunaria not to break in this case? we could detect if we're in the middle of a merge commit, and bail? 💡 |
|
pushing something |
|
wdyt? |
|
Perfect |
I noticed during a meeting that when resolving merge-conflicts with
--continue, Lunaria crashes (it often can't find the file combination for large changes). But when using--continue- you can't use--no-verifyto bypass it.I've added an option to bypass it via an env variable (
NO_VERIFY=1) until we figure it out betterNO_VERIFY=1 git merge --continueor something similar if passing variables is not supported in the system/terminal
cross-env NO_VERIFY=1 git merge --continue@ghostdevv fyi