github-profile-trophy icon indicating copy to clipboard operation
github-profile-trophy copied to clipboard

Include Private Repo PRs

Open MrBlueBird2 opened this issue 3 years ago • 8 comments

The commit trophy counts the commits of public + private repos, but, the pull request trophy counts only public pull requests, can anybody fix this??

MrBlueBird2 avatar Sep 24 '21 08:09 MrBlueBird2

Hey @MrBlueBird2 are you sure the commit trophy is actually counting for private repos? I was about to open an issue for private data. Cheers

LapoElisacci avatar Oct 19 '21 07:10 LapoElisacci

Hey @MrBlueBird2 are you sure the commit trophy is actually counting for private repos? I was about to open an issue for private data. Cheers

The Commit Trophy counts Private + Public Repos, Both, But the pr trophy dosen't

MrBlueBird2 avatar Oct 19 '21 07:10 MrBlueBird2

com_ple__ted___

Akhi2007 avatar Nov 14 '21 15:11 Akhi2007

com_ple__ted___

Let me see

MrBlueBird2 avatar Nov 14 '21 15:11 MrBlueBird2

com_ple__ted___

Still not fixed

MrBlueBird2 avatar Nov 14 '21 15:11 MrBlueBird2

Still no solutions?

Emilien-Lambert avatar Mar 06 '22 15:03 Emilien-Lambert

Nope @Emilien-Lambert

MrBlueBird2 avatar Mar 06 '22 16:03 MrBlueBird2

It might be possible to do something similar to what github readme stats has done and add a Github personal access token to the requests(see their readme for hosting your own Vercel instance). That way users could host their own instance of Github Profile Trophy with their own PAT, with access to their private repositories.

This would require a "modular" way to read the PAT within the code, I.e. from a .env.

Edit: Just tested it. There's already a "GITHUB_TOKEN" env variable in the code. Add your PAT to that when deploying to Vercel (or any other host). Works perfectly.

Nixxen avatar Jul 17 '22 19:07 Nixxen

It might be possible to do something similar to what github readme stats has done and add a Github personal access token to the requests(see their readme for hosting your own Vercel instance). That way users could host their own instance of Github Profile Trophy with their own PAT, with access to their private repositories.

This would require a "modular" way to read the PAT within the code, I.e. from a .env.

Edit: Just tested it. There's already a "GITHUB_TOKEN" env variable in the code. Add your PAT to that when deploying to Vercel (or any other host). Works perfectly.

is it still working ? , I try it and I get this error

{ message: [32m"Bad credentials"[39m, documentation_url: [32m"https://docs.github.com/graphql"[39m }
TypeError: Cannot read properties of undefined (reading 'data')
at GithubAPIClient.request (file:///var/task/src/github_api_client.ts:130:20)
at async GithubAPIClient.requestUserIssue (file:///var/task/src/github_api_client.ts:69:12)
at async Promise.all (index 1)
at async GithubAPIClient.requestUserInfo (file:///var/task/src/github_api_client.ts:20:21)
at async default (file:///var/task/index.ts:59:20)
at async processEvents (file:///var/task/.runtime.ts:190:16)
{ message: [32m"Bad credentials"[39m, documentation_url: [32m"https://docs.github.com/graphql"[39m }
{ message: [32m"Bad credentials"[39m, documentation_url: [32m"https://docs.github.com/graphql"[39m }
{ message: [32m"Bad credentials"[39m, documentation_url: [32m"https://docs.github.com/graphql"[39m }

mbadr2200 avatar Jul 11 '23 17:07 mbadr2200

Changed the Env Variable to GITHUB_TOKEN1 and now its working

mbadr2200 avatar Jul 11 '23 17:07 mbadr2200

Is there any other way that this can be done? or could some explain how you guys solved it, its confusing!

AdithyaGopakumar avatar Aug 19 '23 13:08 AdithyaGopakumar

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Dec 23 '23 02:12 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jan 06 '24 02:01 github-actions[bot]