Setting Up for Second External Pull Request and Contribution to Telescope

Our assignment for this week is the same as the assignment we had last week; to make a large contribution to one external project and to make a contribution to Telescope; our internal project. While I am still trying to decide on what issues I will tackle, I worked on a small fix for my contribution to Telescope from last week: spam-checker.js.

The Issue

In my last contribution, I created a spam checker that determined whether or no a post was spam using a combination of rules and a spam filter function. In my function, the blog post's body content was parsed before any of the checks were run, but if the blog's title was empty or marked as spam the body contents didn't need to be checked. A classmate suggested that I move the blog body parsing to after the title checks to save on resources if title checks failed and the body didn't need to be loaded.

The original order of checks, body is parsed before any checks are run

The Fix

After moving the content parsing after the title checks, I ran the tests to ensure everything was working as intended, then I created a pull request for my fix.

textParser moved after title checks

One issue I ran into while working on my fix was Eslint not liking the space between the function declaration and the parenthesis for the function arguments, but when I removed the space, VSCode would automatically add the space back in. I tried changing various VSCode settings regarding automatic formatting but none solved the issue, so I ended up editing the code with a text editor.

Removed the space between function and (content) with Notepad++

Choosing Internal and External Issues

As my fix is too small to count towards the assignment, I still need to find both an internal and external issue to work on. For my internal issue, I plan to work on implementing writing-level, as it seems that the previous assignees aren't working on it anymore. As for my external issue, I haven't decided on any repo yet, but I'd like t work on something other than Pokemon Showdown as my last two pull requests were for it.

Comments

Popular posts from this blog

The Real Time Voice Cloning Toolbox

Preparing For Hacktoberfest

The Whiteboard Note Taking App