Skip to content

Commit

Permalink
fix: fix error in automatic merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rickstaa committed Jan 21, 2023
1 parent 0b0567a commit 84beb67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/fetchers/stats-fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const GRAPHQL_STATS_QUERY = `
*
* @param {import('axios').AxiosRequestHeaders} variables Fetcher variables.
* @param {string} token GitHub token.
* @returns {Promise<Object>} Stats fetcher response.
* @returns {Promise<import('../common/types').Fetcher>} Stats fetcher response.
*/
const fetcher = (variables, token) => {
const query = !variables.after ? GRAPHQL_STATS_QUERY : GRAPHQL_REPOS_QUERY;
Expand All @@ -89,7 +89,7 @@ const fetcher = (variables, token) => {
* Fetch stats information for a given username.
*
* @param {string} username Github username.
* @returns {Promise<Object>} GraphQL Stats object.
* @returns {Promise<import('../common/types').StatsFetcher>} GraphQL Stats object.
*
* @description This function supports multi-page fetching if the 'FETCH_MULTI_PAGE_STARS' environment variable is set to true.
*/
Expand Down Expand Up @@ -256,7 +256,7 @@ const fetchStats = async (
return prev + curr.stargazers.totalCount;
}, 0);

// @ts-ignore
// @ts-ignore // TODO: Fix this.
stats.rank = calculateRank({
totalCommits: stats.totalCommits,
totalRepos: user.repositories.totalCount,
Expand Down
2 changes: 1 addition & 1 deletion tests/api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe("Test /api/", () => {
text_color: "fff",
bg_color: "fff",
},
data,
data_stats,
);

await api(req, res);
Expand Down

0 comments on commit 84beb67

Please sign in to comment.