Conversation
|
@Crokily is attempting to deploy a commit to the longsizhuo's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a contributors feature that displays GitHub contributors for each documentation page, along with some style adjustments. The feature fetches contributor data from the GitHub API and renders it at the bottom of doc pages.
- Added GitHub API integration to fetch contributors by file path
- Created a Contributors component to display contributor avatars and names
- Removed global CSS rules that forced all rounded corners to be square
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/github.ts | New GitHub API client with caching for fetching contributors |
| app/components/Contributors.tsx | New component to render contributor list with avatars |
| app/docs/[...slug]/page.tsx | Integration of contributors feature into doc pages |
| app/globals.css | Removed global rounded corner override styles |
| .env.sample | Added sample environment variable for GitHub token |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#62
效果:
改动内容:
lib下加了个github.ts用于获取贡献者数据,该接口需要配置一个github账号的personal access token 在环境变量(GITHUB_TOKEN=github_pat_xxxxxxxxxxxxxx)里,需要 @longsizhuo 在vercel里配置一下,增加了一个.env.sapmle用于指示
然后添加了一个contributors组件,即该贡献者组件,该组件在未获取到贡献者数据时不会显示在页内,因此在接口异常时不会对页面造成影响
破坏性改动:
global.css中之前被配置了清除所有圆角样式的代码,这段代码会强制影响后续所有圆形组件,不建议这么使用,删去了这段代码,然后页内出现了一些纯矩形和带圆角的组件,因此后续需要团队讨论统一样式设计,是有圆角设计,还是纯矩形,再另开分支处理。