-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: init the insight page #731
Conversation
xingwanying
commented
Feb 7, 2025
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request introduces the initial implementation of the insight page, adding several components and hooks to fetch and display various statistics related to repositories, such as issue statistics, contributor statistics, and activity statistics. The changes include new API routes, components for displaying charts, and hooks for data fetching. Changes
|
@@ -0,0 +1,53 @@ | |||
import axios from 'axios'; | |||
|
|||
const apiDomain = process.env.NEXT_PUBLIC_API_DOMAIN; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that NEXT_PUBLIC_API_DOMAIN
is defined in the environment variables to avoid runtime errors when making API requests.
pattern_month = re.compile(r"^\d{4}-\d{2}$") | ||
|
||
try: | ||
response = requests.get(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider handling potential JSON parsing errors when fetching contributor data to prevent application crashes.