Skip to main content

Featured

Week 12: Release 0.4 Part: 3

Release 0.4 Part 3 This is going to be my final post for this class which covers my final update on my Release 0.4. Earlier this week I made a PR that ports SearchBar to NextJS but I'm still waiting for it to be reviewed some more. I've had some feedback that I have implemented and have also requested a review again. Overall this Release went pretty smoothly for the actually GitHub side of things like setting up the issue, making the PR, and so on. In Release 0.3 I wasn't so certain on how this process happened with Telescope, but now I never had these issues for 0.4. Issue #1470 Fix #1470: Port SearchBar from Gatsby -> NextJS #1503 Did I Meet My Goals? Going into this release I had two main goals: 1. Setup the Issue/PR with no issues 2. Learn about NextJS I feel like I meet both of these goals at the end. I had no issues setting up my branch, updating my master, making the issue, making the PR, and following through on review comments so far. When it comes to learning m

Week 4: Lab 3

 Lab 3

This weeks lab was all about learning the process of merging branch's together and solving the merge conflicts that get in the way. I had to pick two addition features to add to the Link Status project, but I had to implement them on two different branches which I would eventually merge and push back to master.

LinkStatus Repo

Implementing the new features

I choose to add the option of JSON format output and some new argument flags the would only output certain types of response URLs. Implementing the new features didn't take too long to add since they were just adding new options to the system I have already set up. The hardest part to update was the checkStatus() function because I had to change the function in many ways to allow the different options.

Each branch alone was pretty straightforward to develop the new features on, but the issues came from when the two branches had to be merged since both added on to the existing structure of my program. Everything besides the checkStatus() function went smoothly when the merge happened. The checkStatus() function broke completely since both branches changed so much from that function, thankfully I designed the JSON option to use a bool variable flag if the user wanted it or not. With this the JSON feature was entirely in one part of an "if" statement while the old non JSON format output was placed in the following "else" connected the the statement. This worked will since the new flags in the other feature modified the original code.

Here's the JSON addition:


And here's the following else statement that contains the --all --good --bad feature:


This section of the function was the major source for most of the merge conflicts since the other changes in the program were just simply adding a few lines instead of changing how the program was structured.

Merge Conflicts

With so many changes I was actually surprised how well Git handled the merge. I was able to just view the changes, make a quick change like a brace being moved etc., and then accept both incoming changes.

After merging the two new branches together I had to then make a pull request to merge to master. I encounter an error from Git that told me my master branch was behind.


I simply just had to pull down the current master since I mistakenly never pushed an old branch with some changes I was working on before to master which left master behind my current version. Some merge conflicts came up, but they were not anything major and they were then fixed.

Both new features opened up an issue on the repository with each new branch named after the issue.



And here is the commit URLs:



Final Thoughts

Working on my project again and adding these new features made me realize I need to clean up and organize my code. I can defiantly break some of the repeating parts into there own functions to limit the amount of code duplication I have. There are still some bugs I can think of that need to be fixed that were created from the merging and Im planning to fix them relatively soon.

Overall I feel like I understand the whole process of merging, fixing conflicts, and the branch system better now.

Thanks for reading my latest post!

-Matt

Comments

Popular Posts