feat: remove 'include_private' (#2736)

* feat: remove 'include_private'

As explained in #2517 the 'include_private' flag is confusing and
doesn't work as expected. This commit therefore removes this flag.

* fix: fix tests

* docs: remove redundant private deploy note
This commit is contained in:
Rick Staa
2023-06-07 11:21:28 +03:00
committed by GitHub
parent 0fe51cd539
commit b9200c6cf6
4 changed files with 6 additions and 14 deletions
-8
View File
@@ -173,13 +173,11 @@ const totalCommitsFetcher = async (username) => {
* Fetch stats for a given username.
*
* @param {string} username GitHub username.
* @param {boolean} count_private Include private contributions.
* @param {boolean} include_all_commits Include all commits.
* @returns {Promise<import("./types").StatsData>} Stats data.
*/
const fetchStats = async (
username,
count_private = false,
include_all_commits = false,
exclude_repo = [],
) => {
@@ -229,12 +227,6 @@ const fetchStats = async (
stats.totalCommits = user.contributionsCollection.totalCommitContributions;
}
// if count_private, add private contributions to totalCommits.
if (count_private) {
stats.totalCommits +=
user.contributionsCollection.restrictedContributionsCount;
}
stats.totalPRs = user.pullRequests.totalCount;
stats.totalIssues = user.openIssues.totalCount + user.closedIssues.totalCount;
stats.contributedTo = user.repositoriesContributedTo.totalCount;