-
Notifications
You must be signed in to change notification settings - Fork 477
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
[Feature]: Add Post-Merge Hooks to sync local packages automatically #1621
Comments
@yurishkuro In the future, we can also use Husky pre-commit hooks to check for lint errors, as catching them in dev environment before committing the code is better than checking inside CI env What are your opinions? |
We already have some pre-commit husky hooks, which I personally have disabled locally, because I don't like basic git commands triggering expensive work. |
@yurishkuro Yes, most of the people disable pre-commit hooks like lint test, unit test, etc, as they take up an extra time for each commit, though we can use In the case of post merge, what are your preferences? Should we have it in place? |
I have the same view on post-merge. I do git pull often and in most cases do not need a reinstall of deps, even if they have changed (usually just minor upgrades). What might be useful is a hook that simply warns about outdated deps, if it can be executed very quickly. Then people can reinstall manually. |
@yurishkuro Yeah. Got the point. That hook can also be added, which simply warns about the outdated deps. Going ahead to make a PR for that |
Requirement
The git post-merge hook help run certain commands after
git pull
is executed inside the project's folder.Certain developers forget to run
yarn install
each time they executegit pull
.Problem
For example, a yarn package is added or upgraded inside the project by any other developer, and the other developer working on it locally executes
git pull
but forgets to runyarn install
This can be problematic in some cases and may result in inconsistent code. Like for example, a typescript definition for a package is upgraded in the upstream, but not upgraded inside the local dev env, it won't show the updated types or interfaces if there's any.
Proposal
We can use husky and git post-merge hook to automate this.
This technique is widely used across open-source projects as it automatically executes certain commands after a change in upstream
yarn.lock
orpackage.json
is detected.Open questions
No response
The text was updated successfully, but these errors were encountered: