mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-08-06 00:23:05 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user