Upstream Catchup Best Practices - WideChat/Rocket.Chat GitHub Wiki
- Go through all the commits that are coming in
- Go through Release Notes
- Go through PRs which can affect us or in our interest(Relevant to Omnichannel, Apps, etc) if required from the commits
The default branch of our fork is develop_pwa.
- Make sure your develop_pwa is up to date locally.
git checkout develop_pwa
&git pull widechat develop_pwa
(Here widechat it remote can be origin as well) - Checkout out the upstream branch you want to catch up.
git checkout upstream master
. Or from the catchup PRgh pr checkout <link to PR>
- Then
git merge develop_pwa
Now you will get merge conflicts if any
Install GitLens extension in VS Code. It helps check out the file commit history. And also the last commit details of any line.
- Before removing any code make sure if the change is from upstream or not. And if it is coming from upstream check if the change was made for our use case or not.
- If there is refactor in the file. i.e. .js to .ts, then we need to make sure we don’t lose any changes we made in the .js file for our use case.
- If there is any refactor in components and if we have our own similar components developed. We need to refactor our developed components as well. i.e. In Omnichannel -> Departments/CustomFields/Triggers etc. We have our own Livechat Filters. So if there is any refactor in Omnichannel -> Departments/CustomFields/Triggers we need to do it in the Livechat Filters component as well.
- In the package.json file make sure we are getting updated dependencies from upstream. And for the Livechat and Apps-engine dependencies keep our version(Widechat/Rocket.Chat.Livechat etc). Check from the changes if we need to catch up in those repos as well or not.
- After the conflict in package.json is solved. Do clean npm install to update node_modules