refactor: fix GitHub capitalization (#2232)

This commit is contained in:
Frieder Bluemle
2022-10-26 16:41:59 +02:00
committed by GitHub
parent 8e3147014c
commit 199870aa9f
11 changed files with 29 additions and 29 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import { MissingParamError, request } from "../common/utils.js";
* Repo data fetcher.
*
* @param {import('Axios').AxiosRequestHeaders} variables Fetcher variables.
* @param {string} token Github token.
* @param {string} token GitHub token.
* @returns {Promise<import('Axios').AxiosResponse>} The response.
*/
const fetcher = (variables, token) => {
@@ -56,8 +56,8 @@ const urlExample = "/api/pin?username=USERNAME&amp;repo=REPO_NAME";
/**
* Fetch repository data.
*
* @param {string} username Github username.
* @param {string} reponame Github repository name.
* @param {string} username GitHub username.
* @param {string} reponame GitHub repository name.
* @returns {Promise<import("./types").RepositoryData>} Repository data.
*/
async function fetchRepo(username, reponame) {
+6 -6
View File
@@ -18,7 +18,7 @@ dotenv.config();
* Stats fetcher object.
*
* @param {import('axios').AxiosRequestHeaders} variables Fetcher variables.
* @param {string} token Github token.
* @param {string} token GitHub token.
* @returns {Promise<import('../common/types').StatsFetcherResponse>} Stats fetcher response.
*/
const fetcher = (variables, token) => {
@@ -66,7 +66,7 @@ const fetcher = (variables, token) => {
* Fetch first 100 repositories for a given username.
*
* @param {import('axios').AxiosRequestHeaders} variables Fetcher variables.
* @param {string} token Github token.
* @param {string} token GitHub token.
* @returns {Promise<import('../common/types').StatsFetcherResponse>} Repositories fetcher response.
*/
const repositoriesFetcher = (variables, token) => {
@@ -101,10 +101,10 @@ const repositoriesFetcher = (variables, token) => {
/**
* Fetch all the commits for all the repositories of a given username.
*
* @param {*} username Github username.
* @param {*} username GitHub username.
* @returns {Promise<number>} Total commits.
*
* @description Done like this because the Github API does not provide a way to fetch all the commits. See
* @description Done like this because the GitHub API does not provide a way to fetch all the commits. See
* #92#issuecomment-661026467 and #211 for more information.
*/
const totalCommitsFetcher = async (username) => {
@@ -143,7 +143,7 @@ const totalCommitsFetcher = async (username) => {
/**
* Fetch all the stars for all the repositories of a given username.
*
* @param {string} username Github username.
* @param {string} username GitHub username.
* @param {array} repoToHide Repositories to hide.
* @returns {Promise<number>} Total stars.
*/
@@ -183,7 +183,7 @@ const totalStarsFetcher = async (username, repoToHide) => {
/**
* Fetch stats for a given username.
*
* @param {string} username Github 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.
+2 -2
View File
@@ -15,7 +15,7 @@ dotenv.config();
* Top languages fetcher object.
*
* @param {import('Axios').AxiosRequestHeaders} variables Fetcher variables.
* @param {string} token Github token.
* @param {string} token GitHub token.
* @returns {Promise<import('../common/types').StatsFetcherResponse>} Languages fetcher response.
*/
const fetcher = (variables, token) => {
@@ -53,7 +53,7 @@ const fetcher = (variables, token) => {
/**
* Fetch top languages for a given username.
*
* @param {string} username Github username.
* @param {string} username GitHub username.
* @param {string[]} exclude_repo List of repositories to exclude.
* @returns {Promise<import("./types").TopLangData>} Top languages data.
*/