diff --git a/src/app/projects/assets/contributors.json b/src/app/projects/assets/contributors.json index 037e40d8..00477883 100644 --- a/src/app/projects/assets/contributors.json +++ b/src/app/projects/assets/contributors.json @@ -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, @@ -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, @@ -35,19 +56,33 @@ "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, @@ -55,6 +90,13 @@ "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, @@ -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, @@ -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, @@ -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" @@ -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, @@ -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" } -] +] \ No newline at end of file diff --git a/src/app/projects/assets/projects.json b/src/app/projects/assets/projects.json index 5071d2ac..f45dd3c9 100644 --- a/src/app/projects/assets/projects.json +++ b/src/app/projects/assets/projects.json @@ -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" } -] +] \ No newline at end of file diff --git a/src/app/projects/assets/stats.json b/src/app/projects/assets/stats.json index 36f756e8..ad280dc0 100644 --- a/src/app/projects/assets/stats.json +++ b/src/app/projects/assets/stats.json @@ -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 } -] +] \ No newline at end of file diff --git a/src/app/projects/assets/upcomingProjects.json b/src/app/projects/assets/upcomingProjects.json index 7f7f82bb..ba0118d5 100644 --- a/src/app/projects/assets/upcomingProjects.json +++ b/src/app/projects/assets/upcomingProjects.json @@ -83,4 +83,4 @@ "githubUrl": "https://github.com/mindfiredigital/QuickLaunchReactNativeKit", "documentationUrl": "https://github.com/mindfiredigital/QuickLaunchReactNativeKit" } -] +] \ No newline at end of file diff --git a/updateProject.mjs b/updateProject.mjs index 496d79dd..f5899463 100644 --- a/updateProject.mjs +++ b/updateProject.mjs @@ -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); @@ -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([ @@ -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 @@ -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)