Hacktoberfest week 3

Abdullah Al Mamun Fahim - Oct 27 - - Dev Community

As previously suspected, hardest part of the hacktoberfest has been to find issues to work on. My first place to look was the issues labeled Hacktoberfest. It's even more difficult to find issues that are actually part of legitimate repo. As in its not just made for hacktoberfest, not just a random project but something that is used and actually maintained.

After a lot of searching I found this issue. The issue is part of erxes, "an alternative to the combined functionalities of Hubspot (CRM & Marketing automation) and Qualtrics (Experience management)" according to the repo. With 1.1k forks the repo looked very promising.

So after leaving a message expressing my interest in the issue, I forked the repo and went to work. The issue is mainly to replace sendContactsMessage method with sendCoreMessage in all plugins. Because, the implementation is identical since they both send message to the core.

Firstly, I wanted to see how many instances of sendContactsMessage was in the code base and it was 347. My approach was two step. Find the definition and then the usage. So I filtered the files on vscode by files that have messageBroker.ts as its name and there was only 31 results. There I noticed some files had both sendContactsMessage, sendCoreMessage and some had only sendContactsMessage. So I had to remove the definition or update the method name in each file (since the definition is identical).

After that my next step was to find all the usage of the method sendContactsMessage. It was a lot but with find and replace I was able to replace all the method reference. Only issue was the import statements where now if both sendContactsMessage and sendCoreMessage was imported now there was two sendCoreMessage. So I had to go in each file and manually remove them. This took a while. After I was done, I wanted to do be sure there was no reference of sendContactsMessage in the codebase. But I found the definition in one file that was not updated, since the file was not messageBroker.ts but the definition was in a file that was in messageBroker directory. After the update all the sendContactsMessage was removed. Then I manually checked all sendCoreMessage reference just to be sure I didn't miss any import or duplication.

Once I was done, next step was to make a PR. When I was reading the contribution guidelines (something I should've read before I started), I noticed I was supposed to make a branch off of the dev branch instead of master. Locally, I had to set upstream. Make a new branch from that upstream dev branch. Then I did git cherry pick to select the two commits I made from my old branch to the new one (based on upstream dev). Thankfully there was no conflicts. Then I made the PR with no conflicts with the dev branch. As of writing this, I have not heard back from the owner and someone else from the company has self assigned the issue and made the same PR as me. Hopefully they accept my PR.

. . . . . . . . . . . . .
Terabox Video Player