Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d56ef0d091 | ||
|
|
fdeaad36f1 | ||
|
|
e83c21d9f2 | ||
|
|
61737f6985 | ||
|
|
8e0fa7fbec | ||
|
|
46369f5667 |
@@ -1,10 +1,27 @@
|
||||
## Github Readme stats
|
||||
<p align="center">
|
||||
<h2 align="center">Github Readme Stats</h2>
|
||||
<p align="center">Get dynamically generated GitHub stats on your readmes!</p>
|
||||
|
||||
[](https://github.com/anuraghazra/github-readme-stats/actions)
|
||||
[](https://github.com/anuraghazra/github-readme-stats/issues)
|
||||
[](https://github.com/anuraghazra/github-readme-stats/pulls)
|
||||
<p align="center">
|
||||
<a href="https://github.com/anuraghazra/github-readme-stats/actions">
|
||||
<img alt="Tests Passing" src="https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg" />
|
||||
</a>
|
||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">
|
||||
<img alt="Issues" src="https://img.shields.io/github/issues/anuraghazra/github-readme-stats?color=0088ff" />
|
||||
</a>
|
||||
<a href="https://github.com/anuraghazra/github-readme-stats/pulls">
|
||||
<img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/anuraghazra/github-readme-stats?color=0088ff" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
Get dynamically generated GitHub stats on your readmes!
|
||||
<p align="center">
|
||||
<a href="#demo">View Demo</a>
|
||||
·
|
||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">Report Bug</a>
|
||||
·
|
||||
<a href="https://github.com/anuraghazra/github-readme-stats/issues">Request Feature</a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
# Features
|
||||
|
||||
|
||||
+4
-3
@@ -9,6 +9,7 @@ async function fetchStats(username) {
|
||||
query userInfo($login: String!) {
|
||||
user(login: $login) {
|
||||
name
|
||||
login
|
||||
repositoriesContributedTo(first: 100, contributionTypes: [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY]) {
|
||||
totalCount
|
||||
}
|
||||
@@ -21,7 +22,7 @@ async function fetchStats(username) {
|
||||
issues(first: 100) {
|
||||
totalCount
|
||||
}
|
||||
repositories(first: 100) {
|
||||
repositories(first: 100, orderBy: { direction: DESC, field: STARGAZERS }) {
|
||||
nodes {
|
||||
stargazers {
|
||||
totalCount
|
||||
@@ -31,7 +32,7 @@ async function fetchStats(username) {
|
||||
}
|
||||
}
|
||||
`,
|
||||
variables: { login: username }
|
||||
variables: { login: username },
|
||||
});
|
||||
|
||||
const stats = {
|
||||
@@ -50,7 +51,7 @@ async function fetchStats(username) {
|
||||
|
||||
const user = res.data.data.user;
|
||||
|
||||
stats.name = user.name;
|
||||
stats.name = user.name || user.login;
|
||||
stats.totalIssues = user.issues.totalCount;
|
||||
stats.totalCommits = user.contributionsCollection.totalCommitContributions;
|
||||
stats.totalPRs = user.pullRequests.totalCount;
|
||||
|
||||
Reference in New Issue
Block a user