From 5bc022aaff38b5b76ce85df4fab2574cd297c22a Mon Sep 17 00:00:00 2001
From: ryo-ma
Date: Fri, 30 Apr 2021 09:17:38 +0900
Subject: [PATCH 1/3] Update README.md
---
README.md | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 6a259fa..92876da 100644
--- a/README.md
+++ b/README.md
@@ -181,7 +181,7 @@ Available themes.
| [juicyfresh](#juicyfresh) |
| [buddhism](#buddhism) |
| [oldie](#oldie) |
-
+| [radical](#radical) |
### flat
@@ -303,6 +303,16 @@ https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=oldie
+### radical
+
+```
+https://github-profile-trophy.vercel.app/?username=ryo-ma&theme=radical
+```
+
+
+
+
+
## Margin Width
From 81312a2bbae94020d78d0a6b0d2773ec1a4a2b99 Mon Sep 17 00:00:00 2001
From: Ray Arayilakath
Date: Fri, 30 Apr 2021 07:07:39 -0500
Subject: [PATCH 2/3] feat: retrieve more languages from repos (#47)
This PR closes (#47) by retrieving more languages from each user repository.
---
src/github_api_client.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/github_api_client.ts b/src/github_api_client.ts
index 1200cdc..f0a129d 100644
--- a/src/github_api_client.ts
+++ b/src/github_api_client.ts
@@ -48,7 +48,7 @@ export class GithubAPIClient {
repositories(first: 100, ownerAffiliations: OWNER, isFork: false, orderBy: {direction: DESC, field: STARGAZERS}) {
totalCount
nodes {
- languages(first: 1, orderBy: {direction:DESC, field: SIZE}) {
+ languages(first: 3, orderBy: {direction:DESC, field: SIZE}) {
nodes {
name
}
From b49ef3f705812e16f9f29d5b3aa5bdb3fe9968cd Mon Sep 17 00:00:00 2001
From: Ray Arayilakath
Date: Sun, 2 May 2021 08:22:41 -0500
Subject: [PATCH 3/3] fix: iterate through repository language nodes
Just made a little oopsie I forgot to actually count the language after getting more. Iterating (`.forEach(...)`) through each repository's language nodes should fix the problem.
---
src/github_api_client.ts | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/github_api_client.ts b/src/github_api_client.ts
index f0a129d..50f94f9 100644
--- a/src/github_api_client.ts
+++ b/src/github_api_client.ts
@@ -85,8 +85,12 @@ export class GithubAPIClient {
const languages = new Set();
userData.repositories.nodes.forEach((node: Repository) => {
- if (node.languages.nodes[0] != undefined) {
- languages.add(node.languages.nodes[0].name);
+ if (node.languages.nodes != undefined) {
+ node.languages.nodes.forEach((node: Language) => {
+ if (node != undefined) {
+ languages.add(node.name);
+ }
+ });
}
});
const durationTime = new Date().getTime() -
@@ -108,7 +112,7 @@ export class GithubAPIClient {
languages.size,
durationYear,
ancientAccount,
- joined2020
+ joined2020,
);
return userInfo;
}