Welcome to the weekly blog post about my open source journey! This weeks topic will be about adding a feature to a new an open source repository. The repository we will be working on this week will be The Great Site Generator.
Filing an issue
To start the process of contributing a new feature for an open source project, we need to file an issue. When you file the issue, you should talk about what the feature is, why should it be added and an example scenario. For the repository I am working on, I filed the issue to add support for markdown files with only the header one feature. This is a very small upgrade from the original project but, any contribution is a good contribution. Here is the issue I filed.
Working on the project
Now that I filed the issue and the project owner gave me the okay for the feature, it’s time to start our developer space! First thing, I need to fork the repository and create a new branch for the issue. I reviewed the code to get a better understanding of how the repository worked. It is important to understand the code because when adding to it, you must follow the persons style. Just like your own code you also want to make it efficient and easy to understand so other people can add to it! For me I just added a new function to process a .md file, a new if statement in the main function and edited the help function to include my new feature. I also had to write information on my new feature on the readme file. With a new feature, you need new documentation. My pull request has not been accepted yet but, hopefully will be soon. I learned that you should be updating documentation when adding new features to a repository. I also was learning some C++ features that I don’t remember learning when I first picked up the language. The only problem I had while writing the pull request was forgetting to update documentation with my new feature.
Update on Octo
Octo has received one pull request to also add a markdown feature. The pull request was amazing and actually fixed some things to allow the markdown to work properly. The only thing I need the author to change was the style. They programmed with single quotes instead of double quotes. They also removed all semicolons. They haven’t submitted the style fix yet because it has only been a day for the requested changes but I would imagine it not being a difficult merge.
Conclusion
Overall, open source is fun! It has been helping me get better with reviewing code, writing better code and learning how to work with others! I highly encourage you to contribute to open source and find a repository here on Github! If you’re not liking any of those projects, you can also contribute to dev.to since it is also open source. Thank you for reading!
Top comments (0)