I am trying to calculate the ratio of merged forks to all forks of a repository to analyze if it has any impact on the success of an open-source project. However, I am stuck because I am not sure how to obtain this count. As these are open-source projects, anyone can fork them, right? But I am looking to count the forks made by people who worked or were involved in the development of the project. Given this condition, how do I get the count of all forks and merged forks?
Also,what if they delete the forked repository once they merge it's pull request into the main repository?
I tried using the GitHub API, but I am not getting the desired results. Any ideas on how to proceed? This will be greatly helpful.