Added include_forks path parameter #2611
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I modified the code slightly so now the
isFork
argument in the API request is variable. I added aninclude_forks
path parameter, and if it's true, it passes inisFork: null
, in which the API sends all repos, whether they're forks or not. And if theinclude_forks
path parameter is missing, or is any value other thantrue
, it passes inisFork: false
, which is the current behavior.Note: I've read the other posts, along with the comment at #1122 (comment). I understand that point of view, but I think adding include_forks would be beneficial. For example:
I've worked on a few projects with a small number of contributors, but I don't own those repositories, so I need to make a fork for it to appear on my profile. I'd like those projects to appear under my top-langs image, so allowing forks would let me do that. And to address the comment I linked above, I use the exclude_repo parameter to exclude my forks with a large number of contributors.
Suggestion? (A possible alternate solution could be to change include_forks to be like exclude_forks, where instead of passing in true or false, you pass in a list of forked repository names to include?).