Skip to content

Commit 6910f39

Browse files
committed
git_data_fetcher Updated
1 parent c16f8d5 commit 6910f39

3 files changed

Lines changed: 99 additions & 67 deletions

File tree

git_data_fetcher.mjs

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,46 @@
1+
// This script fetches data from GitHub using the GraphQL API and saves it to JSON files.
2+
3+
// If you are using Node.js version 13 or higher, you can use the following line:
4+
// import "dotenv/config.js"; // This will load the environment variables from the .env file into process.env
5+
6+
// If you are using Node.js version 12 or lower, use the following line instead:
7+
// import dotenv f; // This will load the environment variables from the .env file into process.env
8+
9+
import "dotenv/config.js"; // Use this to load environment variables from .env file
110
import fetch from "node-fetch";
211
import fs from "fs";
3-
import dotenv from "dotenv";
12+
// -------------------------------------------------------------------------------------------------------------------------------
13+
14+
// To debug the Bad Credentials error (401), we will log the GitHub Username and Token presence:
15+
/*
16+
console.log('GITHUB_USERNAME →', process.env.GITHUB_USERNAME);
17+
console.log('GITHUB_TOKEN present →', !!process.env.GITHUB_TOKEN);
18+
const header = {
19+
'Content-Type': 'application/json',
20+
Authorization: `bearer ${process.env.GITHUB_TOKEN}`
21+
};
22+
console.log('Auth header →', header.Authorization);
23+
*/
24+
25+
// If you ever suspect stray whitespace or punctuation, sanitize the GitHub Username and Token:
26+
// process.env.GITHUB_USERNAME = process.env.GITHUB_USERNAME?.trim();
27+
// process.env.GITHUB_TOKEN = process.env.GITHUB_TOKEN?.trim();
28+
// console.log('Sanitized GITHUB_USERNAME →', process.env.GITHUB_USERNAME);
29+
// console.log('Sanitized GITHUB_TOKEN present →', !!process.env.GITHUB_TOKEN);
30+
// console.log('Sanitized Auth header →', `bearer ${process.env.GITHUB_TOKEN}`);
31+
32+
// Example of how to use the sanitized GitHub Username and Token in headers:
33+
/*
34+
const username = process.env.GITHUB_USERNAME?.trim();
35+
const token = process.env.GITHUB_TOKEN?.trim();
36+
37+
const headers = {
38+
'Content-Type': 'application/json',
39+
Authorization: `bearer ${token}`
40+
};
41+
*/
442

5-
dotenv.config();
43+
// -------------------------------------------------------------------------------------------------------------------------------
644

745
// ${openSource.githubUserName} = GitHub Username
846
// GitHub Token = Token generated from GitHub account

src/shared/opensource/projects.json

Lines changed: 57 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,70 @@
11
{
22
"data": [
33
{
4-
"id": "R_kgDOOjlrFw",
4+
"id": "R_kgDOO3Upuw",
5+
"name": "DanteVela.github.io",
6+
"createdAt": "2025-06-06T17:37:13Z",
7+
"url": "https://github.com/DanteVela/DanteVela.github.io",
8+
"description": "Deployment Build of masterPortfolio [Special]",
9+
"isFork": false,
10+
"languages": [
11+
{
12+
"name": "HTML",
13+
"iconifyClass": "logos-html-5"
14+
}
15+
]
16+
},
17+
{
18+
"id": "R_kgDOO2R2bA",
519
"name": "masterPortfolio",
6-
"createdAt": "2025-05-02T21:13:29Z",
20+
"createdAt": "2025-06-05T00:38:54Z",
721
"url": "https://github.com/DanteVela/masterPortfolio",
822
"description": "🔥 The Complete Customizable Software Developer Portfolio Template which lets you showcase your work and provides each and every detail about you as Software Developer.",
9-
"isFork": true,
23+
"isFork": false,
1024
"languages": [
1125
{
12-
"name": "JavaScript",
13-
"iconifyClass": "logos-javascript"
26+
"name": "Dockerfile",
27+
"iconifyClass": "simple-icons:docker"
1428
},
1529
{
16-
"name": "CSS",
17-
"iconifyClass": "logos-css-3"
30+
"name": "JavaScript",
31+
"iconifyClass": "logos-javascript"
1832
},
1933
{
2034
"name": "HTML",
2135
"iconifyClass": "logos-html-5"
2236
},
2337
{
24-
"name": "Dockerfile",
25-
"iconifyClass": "simple-icons:docker"
38+
"name": "CSS",
39+
"iconifyClass": "logos-css-3"
2640
}
2741
]
2842
},
2943
{
30-
"id": "R_kgDOOiodGQ",
31-
"name": "GameDev-FinalGame-CrabRave",
32-
"createdAt": "2025-05-01T01:52:41Z",
33-
"url": "https://github.com/DanteVela/GameDev-FinalGame-CrabRave",
34-
"description": null,
35-
"isFork": false,
36-
"languages": []
37-
},
38-
{
39-
"id": "R_kgDONzZakg",
40-
"name": "GameJam-FinalGame",
41-
"createdAt": "2025-02-03T02:22:43Z",
42-
"url": "https://github.com/DanteVela/GameJam-FinalGame",
43-
"description": null,
44-
"isFork": false,
45-
"languages": []
46-
},
47-
{
48-
"id": "R_kgDOOipPbg",
49-
"name": "JavaFinalProject-BotW-Recipe-Viewer",
50-
"createdAt": "2025-05-01T02:41:37Z",
51-
"url": "https://github.com/DanteVela/JavaFinalProject-BotW-Recipe-Viewer",
52-
"description": null,
44+
"id": "R_kgDOO_JwMQ",
45+
"name": "Python-Learning-Grounds",
46+
"createdAt": "2025-06-20T18:31:36Z",
47+
"url": "https://github.com/DanteVela/Python-Learning-Grounds",
48+
"description": "A comprehensive collection of tutorials and hands-on exercises to support both my own growth and that of fellow Python developers.",
5349
"isFork": false,
5450
"languages": [
5551
{
56-
"name": "Java",
57-
"iconifyClass": "logos-java"
52+
"name": "Python",
53+
"iconifyClass": "logos-python"
5854
}
5955
]
6056
},
6157
{
62-
"id": "R_kgDOOi_8Wg",
63-
"name": "SoftwareEngineering-FinalProject-RailsGradeBook",
64-
"createdAt": "2025-05-01T18:10:32Z",
65-
"url": "https://github.com/DanteVela/SoftwareEngineering-FinalProject-RailsGradeBook",
66-
"description": null,
58+
"id": "R_kgDOO5llgw",
59+
"name": "PHP-Learning-Grounds",
60+
"createdAt": "2025-06-11T01:34:06Z",
61+
"url": "https://github.com/DanteVela/PHP-Learning-Grounds",
62+
"description": "A hands-on PHP learning hub with tutorials, code examples, and mini-projects to guide you from syntax basics to modern web development best practices.",
6763
"isFork": false,
6864
"languages": [
6965
{
70-
"name": "Ruby",
71-
"iconifyClass": "logos:ruby"
72-
},
73-
{
74-
"name": "JavaScript",
75-
"iconifyClass": "logos-javascript"
76-
},
77-
{
78-
"name": "CSS",
79-
"iconifyClass": "logos-css-3"
66+
"name": "PHP",
67+
"iconifyClass": "logos-php"
8068
},
8169
{
8270
"name": "HTML",
@@ -85,24 +73,30 @@
8573
]
8674
},
8775
{
88-
"id": "R_kgDOOi_dQA",
89-
"name": "SoftwareEngineering-IP-FinalProject",
90-
"createdAt": "2025-05-01T17:52:47Z",
91-
"url": "https://github.com/DanteVela/SoftwareEngineering-IP-FinalProject",
92-
"description": null,
76+
"id": "R_kgDOO-D11A",
77+
"name": "Voice-Assistant-Python",
78+
"createdAt": "2025-06-18T22:10:12Z",
79+
"url": "https://github.com/DanteVela/Voice-Assistant-Python",
80+
"description": "A repository of a speech-driven virtual assistant powered by Speech Recognition for voice input, pyttsx3 for text-to-speech, Pywhatkit and webbrowser for web tasks, plus Wikipedia lookups and programmer jokes via pyjokes.",
9381
"isFork": false,
9482
"languages": [
9583
{
96-
"name": "JavaScript",
97-
"iconifyClass": "logos-javascript"
98-
},
99-
{
100-
"name": "HTML",
101-
"iconifyClass": "logos-html-5"
102-
},
84+
"name": "Python",
85+
"iconifyClass": "logos-python"
86+
}
87+
]
88+
},
89+
{
90+
"id": "R_kgDOPIcNBA",
91+
"name": "Predicting-Winning-Numbers",
92+
"createdAt": "2025-07-07T15:11:43Z",
93+
"url": "https://github.com/DanteVela/Predicting-Winning-Numbers",
94+
"description": "Machine learning models that are trained on using historical data to predict the future.",
95+
"isFork": false,
96+
"languages": [
10397
{
104-
"name": "CSS",
105-
"iconifyClass": "logos-css-3"
98+
"name": "Python",
99+
"iconifyClass": "logos-python"
106100
}
107101
]
108102
}

src/shared/opensource/pull_requests.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/UTRGV-CS-3370/activity-branch-and-merge-group07/pull/1",
88
"state": "MERGED",
99
"mergedBy": {
10-
"avatarUrl": "https://avatars.githubusercontent.com/u/70284605?v=4",
10+
"avatarUrl": "https://avatars.githubusercontent.com/u/70284605?u=9f40a2ab9ad37858da7a490c523caaa402e0d9cf&v=4",
1111
"url": "https://github.com/DanteVela",
1212
"login": "DanteVela"
1313
},
@@ -32,7 +32,7 @@
3232
"url": "https://github.com/utrgv-software-engineering/instagram-DanteVela/pull/1",
3333
"state": "MERGED",
3434
"mergedBy": {
35-
"avatarUrl": "https://avatars.githubusercontent.com/u/70284605?v=4",
35+
"avatarUrl": "https://avatars.githubusercontent.com/u/70284605?u=9f40a2ab9ad37858da7a490c523caaa402e0d9cf&v=4",
3636
"url": "https://github.com/DanteVela",
3737
"login": "DanteVela"
3838
},

0 commit comments

Comments
 (0)