Last time, I was planning on what issues I could take on for this assignment, I found a couple more and started working on them.
I found another issue on a tool created by GitHub to update how the "time in draft" is calculated for a pull request. When a PR changes from "ready for review" back into "draft", the time is not calculated, so there needs to some updates for it.
Fixing Brave browser bug
Regarding the working on the brave issue, because of the sheer size of the repo, it was tough to find the exact file where the filter lists and global defaults are handled, but I found in an interesting way.
I backtracked the file through VS Code search!
I figured they all must be part of the same file, so I searched for that particular text:

I saw the actual text is stored in another file to make it easier to modify, I look at the variable name corresponding to it.

I saw the file, where is getting used and saw that the components in that file are the same the one I saw in the browser.

At the top of the file, saw the functions it uses to open the tabs for the filter settings, I looked into how to focus on a tab if the particular URL is already open an existing tab and added the code for it.
I thought the issue was going to be harder because I wasn't sure what exactly was causing the issue. But all it needed was a small change in code.
I made the pull request for it, but I am not sure if it will get merged anytime soon because it is a low priority issue right now.
Fixing issue-metrics bug
For this issue, I looked into where the time in draft is actually calculated and found the following section of code:
Then I found the function that calculated the draft time, right now it does a subtraction of "ready_for_review" time from "created_at" time.
I noticed that it is using the github3 library for the project and looked at how to get the draft times. While looking at how the ready for review date was calculated, I realized there isn't a direct way to get the draft, and I had to look through the events for that particular issue and get review and draft events.
Then I had to calculate the time from each review and draft interval.
I then updated the code fix the issue:
I also updated the tests and added a couple more to test the function.
Once all the tests passed and everything worked as expected, I made a pull request.
I found another good issue as well, but I will let you know about that and an overview of my everything over the past few months in another blog post!






SOCIAL SHARE CARD GENERATOR