-
Notifications
You must be signed in to change notification settings - Fork 80
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: Embeing GitHub Discussions into Frontend Fundamentals #167
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Looks perfect for the MVP!
.vitepress/ko.mts
Outdated
text: "디스커션 보기", | ||
link: "/code/dicussions/table" | ||
}, |
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.
How about adding 'community' to path?
e.g "/code/community/dicussions/table"
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.
Sure, I Will Change Category Name 💯
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.
I noticed that there appears to be a small typo in the path. The current spelling is dicussions
, but I believe the correct spelling should be discussions
. Also, it seems the folder path code/dicussions
would need to be updated to code/discussions
!
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.
sortField, | ||
sortDirection, | ||
handleSort | ||
} = useGithubDiscussions(props.owner, props.repo, { |
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.
👁️👁️ ❗
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.
this.props is passed by component.
do you think this way is dangerous 👀 ?
<GithubDiscussions owner="toss" repo="frontend-fundamentals" />
api/github.js
Outdated
export default async function handler(req, res) { | ||
const { query, variables } = req.body || {}; | ||
|
||
if (!query) { | ||
return res.status(400).json({ error: 'Missing "query" in request body' }); | ||
} | ||
|
||
const GITHUB_ACCESS_TOKEN = process.env.READ_GITHUB_DISCUSSION_ACCESS_TOKEN; | ||
|
||
if (!GITHUB_ACCESS_TOKEN) { | ||
return res.status(500).json({ error: "Missing API Key" }); | ||
} | ||
|
||
return fetch("https://api.github.com/graphql", { | ||
method: "POST", | ||
headers: { | ||
"Content-Type": "application/json", | ||
Authorization: `Bearer ${GITHUB_ACCESS_TOKEN}` | ||
}, | ||
body: JSON.stringify({ query }) | ||
}); | ||
} |
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.
👍 👍
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.
But doesn't it reveals token on the network tab?
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.
I understand that if I use a serverless function, only the response provided by the Vercel server is exposed. 👀
<a :href="discussion.url" target="_blank">{{ | ||
discussion.title | ||
}}</a> | ||
<span v-if="discussion.closed" class="closed-badge">닫힘</span> |
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.
How about using other word? e.g...
- 완료
- 정리 완료
- 🎯 마무리된 토론
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.
"🎯 마무리된 토론" 👍
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.
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.
@milooy
I confirmed operation and verified that the personal token is not exposed through vercel preview. :)

📝 Key Changes
🖼️ Before and After Comparison