Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 77 additions & 28 deletions src/app/projects/assets/contributors.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
[
{
"id": 116242186,
"contributions": 273,
"contributions": 286,
"html_url": "https://github.com/ashutosh-jena-mindfire",
"avatar_url": "https://avatars.githubusercontent.com/u/116242186?v=4",
"login": "ashutosh-jena-mindfire"
},
{
"id": 80667930,
"contributions": 188,
"contributions": 224,
"html_url": "https://github.com/lakinmindfire",
"avatar_url": "https://avatars.githubusercontent.com/u/80667930?v=4",
"login": "lakinmindfire"
},
{
"id": 121153274,
"contributions": 185,
"html_url": "https://github.com/madhav-nasit",
"avatar_url": "https://avatars.githubusercontent.com/u/121153274?v=4",
"login": "madhav-nasit"
},
{
"id": 120394376,
"contributions": 126,
Expand All @@ -27,6 +34,20 @@
"avatar_url": "https://avatars.githubusercontent.com/u/7521181?v=4",
"login": "ssswagatss"
},
{
"id": 66638045,
"contributions": 108,
"html_url": "https://github.com/Siddharth-1698",
"avatar_url": "https://avatars.githubusercontent.com/u/66638045?v=4",
"login": "Siddharth-1698"
},
{
"id": 155735643,
"contributions": 87,
"html_url": "https://github.com/deepakyadav-01",
"avatar_url": "https://avatars.githubusercontent.com/u/155735643?v=4",
"login": "deepakyadav-01"
},
{
"id": 63102290,
"contributions": 57,
Expand All @@ -35,26 +56,47 @@
"login": "VershalaTandon"
},
{
"id": 31609471,
"contributions": 29,
"html_url": "https://github.com/soumyadeep589",
"avatar_url": "https://avatars.githubusercontent.com/u/31609471?v=4",
"login": "soumyadeep589"
"id": 104986454,
"contributions": 34,
"html_url": "https://github.com/pratul-mindfire",
"avatar_url": "https://avatars.githubusercontent.com/u/104986454?v=4",
"login": "pratul-mindfire"
},
{
"id": 64151314,
"contributions": 26,
"contributions": 33,
"html_url": "https://github.com/BasudevBharatBhushan",
"avatar_url": "https://avatars.githubusercontent.com/u/64151314?v=4",
"login": "BasudevBharatBhushan"
},
{
"id": 108745749,
"contributions": 31,
"html_url": "https://github.com/Shubh2694",
"avatar_url": "https://avatars.githubusercontent.com/u/108745749?v=4",
"login": "Shubh2694"
},
{
"id": 31609471,
"contributions": 29,
"html_url": "https://github.com/soumyadeep589",
"avatar_url": "https://avatars.githubusercontent.com/u/31609471?v=4",
"login": "soumyadeep589"
},
{
"id": 103591425,
"contributions": 25,
"html_url": "https://github.com/ArnabKMindfire",
"avatar_url": "https://avatars.githubusercontent.com/u/103591425?v=4",
"login": "ArnabKMindfire"
},
{
"id": 85334692,
"contributions": 25,
"html_url": "https://github.com/hemant-sudhanshu",
"avatar_url": "https://avatars.githubusercontent.com/u/85334692?v=4",
"login": "hemant-sudhanshu"
},
{
"id": 148045555,
"contributions": 18,
Expand All @@ -70,11 +112,11 @@
"login": "lakinmohapatra"
},
{
"id": 85334692,
"id": 160819069,
"contributions": 16,
"html_url": "https://github.com/hemant-sudhanshu",
"avatar_url": "https://avatars.githubusercontent.com/u/85334692?v=4",
"login": "hemant-sudhanshu"
"html_url": "https://github.com/konark-mindfire",
"avatar_url": "https://avatars.githubusercontent.com/u/160819069?v=4",
"login": "konark-mindfire"
},
{
"id": 118360815,
Expand All @@ -90,6 +132,20 @@
"avatar_url": "https://avatars.githubusercontent.com/u/5602062?v=4",
"login": "debabratapatra"
},
{
"id": 155735575,
"contributions": 15,
"html_url": "https://github.com/anandmindfire",
"avatar_url": "https://avatars.githubusercontent.com/u/155735575?v=4",
"login": "anandmindfire"
},
{
"id": 87860388,
"contributions": 15,
"html_url": "https://github.com/iabhishekkumarms",
"avatar_url": "https://avatars.githubusercontent.com/u/87860388?v=4",
"login": "iabhishekkumarms"
},
{
"id": 29296038,
"contributions": 13,
Expand All @@ -104,16 +160,9 @@
"avatar_url": "https://avatars.githubusercontent.com/u/134675427?v=4",
"login": "VershalaT"
},
{
"id": 160819069,
"contributions": 11,
"html_url": "https://github.com/konark-mindfire",
"avatar_url": "https://avatars.githubusercontent.com/u/160819069?v=4",
"login": "konark-mindfire"
},
{
"id": 138189810,
"contributions": 10,
"contributions": 11,
"html_url": "https://github.com/Satyam-Mindfire",
"avatar_url": "https://avatars.githubusercontent.com/u/138189810?v=4",
"login": "Satyam-Mindfire"
Expand All @@ -139,13 +188,6 @@
"avatar_url": "https://avatars.githubusercontent.com/u/137804674?v=4",
"login": "Bhupesh-mfsi"
},
{
"id": 87860388,
"contributions": 6,
"html_url": "https://github.com/iabhishekkumarms",
"avatar_url": "https://avatars.githubusercontent.com/u/87860388?v=4",
"login": "iabhishekkumarms"
},
{
"id": 10649999,
"contributions": 6,
Expand Down Expand Up @@ -180,5 +222,12 @@
"html_url": "https://github.com/divyarbehera",
"avatar_url": "https://avatars.githubusercontent.com/u/20682504?v=4",
"login": "divyarbehera"
},
{
"id": 5079169,
"contributions": 1,
"html_url": "https://github.com/mfsi-waseema",
"avatar_url": "https://avatars.githubusercontent.com/u/5079169?v=4",
"login": "mfsi-waseema"
}
]
]
30 changes: 29 additions & 1 deletion src/app/projects/assets/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,33 @@
"shortDescription": "Simplifies mobile development with pre-built features like login, signup, and settings. Developers integrate efficiently, leveraging diverse themes.",
"githubUrl": "https://github.com/mindfiredigital/MobileQuickLaunchKit-Android",
"documentationUrl": "https://github.com/mindfiredigital/MobileQuickLaunchKit-Android"
},
{
"id": 15,
"title": "neo-pusher",
"short_description": "Automates CSV to Neo4j data transfer with schema generation, preprocessing, and insertion. Streamlines database integration, ensuring data consistency and efficiency.",
"github_repository_link": "https://github.com/mindfiredigital/neo-pusher",
"documentation_link": "https://pypi.org/project/neo-pusher/",
"project_type": "current",
"date_created": "2024-08-28T11:26:33.000Z",
"date_updated": null,
"status": "published",
"shortDescription": "Automates CSV to Neo4j data transfer with schema generation, preprocessing, and insertion. Streamlines database integration, ensuring data consistency and efficiency.",
"githubUrl": "https://github.com/mindfiredigital/neo-pusher",
"documentationUrl": "https://pypi.org/project/neo-pusher/"
},
{
"id": 16,
"title": "react-text-igniter",
"short_description": "A powerful and intuitive HTML Editor built with React.js.",
"github_repository_link": "https://github.com/mindfiredigital/react-text-igniter",
"documentation_link": "https://github.com/mindfiredigital/react-text-igniter",
"project_type": "current",
"date_created": "2024-09-03T11:15:08.000Z",
"date_updated": null,
"status": "published",
"shortDescription": "A powerful and intuitive HTML Editor built with React.js.",
"githubUrl": "https://github.com/mindfiredigital/react-text-igniter",
"documentationUrl": "https://github.com/mindfiredigital/react-text-igniter"
}
]
]
42 changes: 25 additions & 17 deletions src/app/projects/assets/stats.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
[
{
"name": "fmdapi-node-weaver",
"name": "react-canvas-editor",
"type": "npm",
"day": 0,
"week": 3,
"year": 70,
"total": 70
"week": 32,
"year": 1514,
"total": 1514
},
{
"name": "react-canvas-editor",
"name": "canvas-editor",
"type": "npm",
"day": 1,
"week": 22,
"year": 947,
"total": 947
"week": 19,
"year": 1426,
"total": 1426
},
{
"name": "canvas-editor",
"name": "react-text-igniter",
"type": "npm",
"day": 72,
"week": 230,
"year": 230,
"total": 230
},
{
"name": "fmdapi-node-weaver",
"type": "npm",
"day": 0,
"week": 7,
"year": 1063,
"total": 1063
"week": 1,
"year": 94,
"total": 94
},
{
"name": "neo-pusher",
"type": "pypi",
"last_day": 46,
"last_week": 935,
"last_month": 1011,
"total": 1011
"last_day": 14,
"last_week": 376,
"last_month": 1341,
"total": 1341
}
]
]
2 changes: 1 addition & 1 deletion src/app/projects/assets/upcomingProjects.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@
"githubUrl": "https://github.com/mindfiredigital/QuickLaunchReactNativeKit",
"documentationUrl": "https://github.com/mindfiredigital/QuickLaunchReactNativeKit"
}
]
]
55 changes: 41 additions & 14 deletions updateProject.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

// Function to fetch data from an API endpoint
async function fetchData(url, options) {
const response = await fetch(url, options);
Expand All @@ -24,11 +23,29 @@ async function fetchCollaborators(url, githubToken) {
Accept: "application/vnd.github.v3+json",
},
};
return await fetchData(url, options);
try {
const data = await fetchData(url, options);
// New: Check if the response is an array (valid collaborators data)
if (Array.isArray(data)) {
return data;
} else {
console.log(`No collaborators found or invalid response for URL: ${url}`);
return [];
}
} catch (error) {
console.error(`Error fetching collaborators from ${url}:`, error.message);
return [];
}
}

// Function to get collaborators of a repository
async function getCollaborators(repoData, githubToken) {
// Check if contributors_url exists
if (!repoData.contributors_url) {
console.log(`No contributors URL found for repository: ${repoData.name}`);
return [];
}

if (repoData.fork && repoData.parent?.contributors_url) {
// If the repository is a fork and has a parent, fetch collaborators from both
const [c1, c2] = await Promise.all([
Expand Down Expand Up @@ -138,19 +155,28 @@ async function updateProjects() {
const repoNames = repositories.map((repo) => repo.name);
const contributorsObject = {};
for (const repoName of repoNames) {
const repoData = await fetchData(
`https://api.github.com/repos/mindfiredigital/${repoName}`,
{
headers: {
Authorization: `token ${githubToken}`,
Accept: "application/vnd.github.v3+json",
},
try {
const repoData = await fetchData(
`https://api.github.com/repos/mindfiredigital/${repoName}`,
{
headers: {
Authorization: `token ${githubToken}`,
Accept: "application/vnd.github.v3+json",
},
}
);
const contributors = await getCollaborators(repoData, githubToken);
if (contributors.length > 0) {
contributorsObject[repoName] = contributors;
} else {
console.log(`No contributors found for repository: ${repoName}`);
}
);
contributorsObject[repoName] = await getCollaborators(
repoData,
githubToken
);
} catch (error) {
console.error(
`Error processing repository ${repoName}:`,
error.message
);
}
}

// Aggregate contributor from contributors
Expand Down Expand Up @@ -192,6 +218,7 @@ async function updateProjects() {
"fmdapi-node-weaver",
"react-canvas-editor",
"canvas-editor",
"react-text-igniter",
];
const pypiPackages = ["neo-pusher"];
getAllStats(npmPackages, pypiPackages)
Expand Down