This content originally appeared on DEV Community and was authored by Harshil Patel
This blog will talk about my experience regarding the final PR I made towards Hacktoberfest. If you have read my previous blogs, you would know that I am enrolled in an open-source development course at Seneca College. Participating and completing Hacktoberfest is part of the curriculum, and I completed all four PRs by solving issues in different open-source repositories. I have already written blogs for the first three PRs, and this blog is about the fourth one.
When I was looking for the fourth issue, I wanted to contribute to a project that uses the C# language. This was because, for my first three PRs, I contributed to JavaScript and TypeScript projects, and I wanted to push myself further by tackling an issue in another programming language. After JavaScript, the second-best language I know is C# because I am working on an ASP.NET project called StyleMate, and I worked with ASP.NET during my co-op at the Healthcare of Ontario Pension Plan (HOOPP). So, I filtered the trending repositories on GitHub by the C# language, but I was unable to find any good issues for me. After that, I started exploring the contributions of other students from my open-source class, and luckily, I found a repository called libplanet.
Libplanet is a .NET library for creating multiplayer online games in a decentralized fashion, meaning the entire gameplay occurs on a peer-to-peer network among equal nodes rather than on a centralized server. Under the hood, it incorporates many features (e.g., digital signatures, BFT consensus, data replication) of a blockchain. The issue I worked on was related to the removal of redundant code from one of the utility classes called TestUtils
, which was used for unit testing.
The first task for me was to figure out what testing framework had been used by Libplanet, and after going through their Contribution.md, I found that the library uses Xunit.net for testing purposes. I have worked with Xunit before, so it was not new to me. I tried building the project locally, but I got an error saying the project was using .NET 6, and my PC had .NET 8. As a result, I installed .NET 6. After that, I made the changes and tried running the unit tests. Initially, I was confused because I was looking for TestUtils
in the test output but couldn’t find it. After some time, I realized that TestUtils
is a utility class used by other unit tests, and I found some tests that used TestUtils
in their code. The code worked as expected, so I messaged on the issue with the new code, and the repo maintainer asked me to submit a PR.
Following that, I made a PR, mentioning the code changes and requesting a review. Interestingly, the maintainer requested a rebase because the main branch had a few commits after I created the issue branch.
I rebased the PR to the latest changes on the main branch and committed the updates. Finally, my PR got merged, and I am officially done with Hacktoberfest. Even though Hacktoberfest is completed, I am planning to continue this open-source journey.
This content originally appeared on DEV Community and was authored by Harshil Patel
Harshil Patel | Sciencx (2024-10-27T22:04:29+00:00) Hacktoberfest 4/4: The final PR. Retrieved from https://www.scien.cx/2024/10/27/hacktoberfest-4-4-the-final-pr/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.