-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate scraper to typescript and adds support for GitHub discussions
* GSoC_Week_1:Refactor present scrapper into typescript and addition in type.ts and gh_events.ts * GSoC_Week_1:Refactor present scrapper into typescript and addition in type.ts and gh_events.ts * Delete newGt.ts * remove unwated changes * Scraper githu.ts divided into different files for better understanding * fix scraper setup * Integrate Github Discussion in scraper and update scraper-dry-run workflow * Removing dry-run work flow error (date-fns) * Fixing scraper-dry-run date error by puting null as a default value for date * Fixing scraper-dry-run failing * Fixing scraper-dry-run failing * Fixing scraper-dry-run failing * Fixing scraper-dry-run failing (Genrate markdown files) * Fixing scraper-dry-run failing (Genrate markdown files) * Fixing scraper-dry-run failing (Genrate markdown files) * Fixing scraper-dry-run failing (Genrate markdown files) * Suggested cahnges done * Update test schema for discussion * resolve-dry-run error with pnpm * Revert accidental cahnges in scraper0dry-run.yaml * Revert accidental cahnges in scraperdry-run.yaml * dotenv used in generateNewContrbutors.js * remove: dotenv used in generateNewContrbutors.js * Fix path for data repository to solve dry-run error * update pnpm-lock.yaml * Store seprately all discussion in discussion folder * Update discussion schema * Update discussion schema * Update scraper-dry-run.yaml * Update scraper-dry-run.yaml and fix some typos * Update scraper-dry-run.yaml * Remove casting in fetchEvents.ts * fix type error * Fix type errors * Modify types and remove all types error from scraper * Description added to discussion scraper * Description added to discussion scraper * Discussion UI created at home, disucssions and cotrnbutors profile route * uncomment in scraper * Update Github Dicussions to Discussion * Point mechanism for discussions and responsiveness added * Site map updated for gh-discussion * type error fix in api.ts and modify logic of leaderboard for discussions * prose-h2 added to fix markdown bug * Modified suggested changes still one type error remaining * Modified suggested changes still one type error remaining * Chages done as per review * fix type error in api.ts mismatch in return type of discussion * Add suspense boundary for discussions filter * fix open in github button responsiveness issue * fix incorrect roots and remove unused imports * Enable empathy badge and merge discussions with old data * requested changes are done participants logic in progress * remove unnecessary `useMemo` * Implement logic to fetch discussion within daterange (updated or created) and merge with old data * Removing previous logic of fetch participants * Remove unwanted changes * Handle nullable values while scraping discussion * Modify testing if the discussion.json is empty or notpresent * Fixing testing logic * Change in discussion scraper logic and modify reposName to repository as requested in review * fix naming convetntions and discussion-schema-testing when there is no discussion dir present * Update tests/github-discussion-schema.test.mjs * remove unused packages, scripts and upgraded package versions * remove unused methods * move markdown render to server side * check if discussions dir. exists before reading * support for scraper workflow to run on non-main branches * update scraper action workflow * update data repo dir. in scraper workflow * update data dir. in scraper workflow --------- Co-authored-by: rithviknishad <[email protected]> Co-authored-by: Rithvik Nishad <[email protected]>
- Loading branch information
1 parent
a090186
commit 2a56d9b
Showing
50 changed files
with
5,277 additions
and
3,497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
.pnp.js | ||
bun.lockb | ||
package-lock.json | ||
pnpm-lock.yaml | ||
|
||
# testing | ||
/coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Metadata } from "next"; | ||
import { env } from "@/env.mjs"; | ||
import { notFound } from "next/navigation"; | ||
import { featureIsEnabled } from "@/lib/utils"; | ||
import FilterDiscussions from "../../components/discussions/FilterDiscussions"; | ||
import { categories } from "../../lib/discussion"; | ||
import DiscussionLeaderboard from "../../components/discussions/DiscussionLeaderboard"; | ||
import { Suspense } from "react"; | ||
|
||
export const metadata: Metadata = { | ||
title: `Disucssions | ${env.NEXT_PUBLIC_PAGE_TITLE}`, | ||
}; | ||
|
||
export default function DiscussionsLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
if (!featureIsEnabled("Discussions")) return notFound(); | ||
|
||
return ( | ||
<div className="mx-auto max-w-6xl p-5"> | ||
<div className="items-center gap-5 pb-8 lg:mt-10 lg:flex"> | ||
<h1 className="text-3xl sm:text-4xl">Disucssions</h1> | ||
<Suspense fallback={<></>}> | ||
<FilterDiscussions categories={categories} /> | ||
</Suspense> | ||
</div> | ||
<div className="flex w-full flex-col-reverse gap-3 lg:flex lg:flex-row"> | ||
{children} | ||
<DiscussionLeaderboard /> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { fetchGithubDiscussion } from "../../lib/discussion"; | ||
import GithubDiscussions from "../../components/discussions/GithubDiscussions"; | ||
|
||
interface Params { | ||
searchParams: { [key: string]: string }; | ||
} | ||
|
||
export default async function Page({ searchParams }: Params) { | ||
const discussions = await fetchGithubDiscussion(); | ||
|
||
return ( | ||
discussions && ( | ||
<GithubDiscussions | ||
discussions={discussions} | ||
searchParams={searchParams} | ||
/> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.