Skip to content

Conversation

@GulSam00
Copy link
Owner

@GulSam00 GulSam00 commented Aug 7, 2025

๐Ÿ“Œ PR ์ œ๋ชฉ

Fix : ํฌ๋กค๋ง ๋ฐฉ์‹ ๋ณ€๊ฒฝ

๐Ÿ“Œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ

  • KY๋…ธ๋ž˜๋ฐฉ ํ™ˆํŽ˜์ด์ง€์—์„œ ์œ ํšจํ•œ ๋ฒˆํ˜ธ์ธ์ง€ ํ™•์ธํ•˜๋Š” ๊ธฐ๋Šฅ ์ถ”๊ฐ€ (crawlYoutubeVaild.ts)
  • ์œ ํŠœ๋ธŒ ํฌ๋กค๋ง, ์œ ํŠœ๋ธŒ ํฌ๋กค๋ง๋œ ์ฝ”๋“œ ๊ฒ€์ฆ ์ž‘์—… ๋™์‹œ์— ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ™˜๊ฒฝ ๊ตฌ์ถ•
    • ์ œ๋ชฉ ๋น„๊ต ์‹œ include๊ฐ€ ์•„๋‹Œ ์•ž๊ธ€์ž 2์ž, ๋’ท๊ธ€์ž 2์ž๋กœ ๋น„๊ตํ•˜๋„๋ก ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ณ€๊ฒฝ

๐Ÿ’ฌ ์ถ”๊ฐ€ ์ฐธ๊ณ  ์‚ฌํ•ญ

GulSam00 added 17 commits June 18, 2025 21:22
โ€ฆASE_SERVICE_ROLE_KEY์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š” ๊ฒƒ์„ ๋ฐœ๊ฒฌ. SUPABASE_ANON_KEY์œผ๋กœ ๊ต์ฒด
@GulSam00 GulSam00 requested a review from Copilot August 7, 2025 16:02
@vercel
Copy link
Contributor

vercel bot commented Aug 7, 2025

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
singcode โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Aug 7, 2025 4:48pm

This comment was marked as outdated.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

์ด PR์€ ํฌ๋กค๋ง ๋ฐฉ์‹์„ ๋ณ€๊ฒฝํ•˜๊ณ  ์ƒˆ๋กœ์šด ์œ ํšจ์„ฑ ๊ฒ€์ฆ ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•˜๋Š” ์ž‘์—…์ž…๋‹ˆ๋‹ค. ์ฃผ์š” ๋ชฉ์ ์€ KY๋…ธ๋ž˜๋ฐฉ ํ™ˆํŽ˜์ด์ง€์—์„œ ๋ฒˆํ˜ธ์˜ ์œ ํšจ์„ฑ์„ ํ™•์ธํ•˜๋Š” ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•˜๊ณ , ์ฝ”๋“œ์˜ ๊ตฌ์กฐ๋ฅผ ๊ฐœ์„ ํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

  • KY๋…ธ๋ž˜๋ฐฉ ํ™ˆํŽ˜์ด์ง€์—์„œ ๋ฒˆํ˜ธ ์œ ํšจ์„ฑ ๊ฒ€์ฆ ๊ธฐ๋Šฅ ์ถ”๊ฐ€ (crawlYoutubeVaild.ts)
  • ๊ธฐ์กด ํฌ๋กค๋ง ๋กœ์ง ๊ฐœ์„  ๋ฐ ๊ฒ€์ฆ ์ž‘์—… ๋™์‹œ ์‹คํ–‰ ํ™˜๊ฒฝ ๊ตฌ์ถ•
  • ์ฝ”๋“œ ํ’ˆ์งˆ ๊ฐœ์„ ์„ ์œ„ํ•œ ํ•จ์ˆ˜๋ช… ์˜คํƒ€ ์ˆ˜์ • ๋ฐ ๋ชจ๋“ˆ ๊ตฌ์กฐ ์žฌ์ •๋ฆฌ

Reviewed Changes

Copilot reviewed 32 out of 38 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/open-api/src/instance.ts ํ•จ์ˆ˜๋ช… ์˜คํƒ€ ์ˆ˜์ • (isVaild โ†’ isValid)
packages/open-api/src/getPopular.ts ํ•จ์ˆ˜๋ช… ์ˆ˜์ • ๋ฐ ์ฝ”๋“œ ์Šคํƒ€์ผ ํ†ต์ผ
packages/crawling/src/crawlYoutubeValid.ts KY ๋…ธ๋ž˜๋ฐฉ ๋ฒˆํ˜ธ ์œ ํšจ์„ฑ ๊ฒ€์ฆ ๊ธฐ๋Šฅ ์‹ ๊ทœ ์ถ”๊ฐ€
packages/crawling/src/crawlYoutube.ts ๊ธฐ์กด ํฌ๋กค๋ง ๋กœ์ง์— ์œ ํšจ์„ฑ ๊ฒ€์ฆ ์ถ”๊ฐ€
packages/crawling/src/utils/ ์œ ํ‹ธ๋ฆฌํ‹ฐ ํ•จ์ˆ˜๋“ค์„ ๋ณ„๋„ ๋ชจ๋“ˆ๋กœ ๋ถ„๋ฆฌ ๋ฐ ์žฌ๊ตฌ์„ฑ
๊ธฐํƒ€ ํŒŒ์ผ๋“ค ์ฝ”๋“œ ์Šคํƒ€์ผ ํ†ต์ผ, ์ž„ํฌํŠธ ๊ฒฝ๋กœ ์ •๋ฆฌ, ์„ค์ • ํŒŒ์ผ ์ถ”๊ฐ€

import type { Brand, Period, ResponseType, InstanceResponse } from "./types";

export const isVaildBrand = (brand: string): brand is Brand => {
export const isValidBrand = (brand: string): brand is Brand => {
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ํ•จ์ˆ˜๋ช… ์˜คํƒ€๊ฐ€ ์ˆ˜์ •๋˜์—ˆ์Šต๋‹ˆ๋‹ค. 'isVaild'์—์„œ 'isValid'๋กœ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +57
if (
(titleResult.includes(parsedTitle.slice(0, 2)) ||
titleResult.includes(parsedTitle.slice(-2))) &&
(artistResult.includes(parsedArtist.slice(0, 2)) ||
artistResult.includes(parsedArtist.slice(-2)))
) {
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] ์กฐ๊ฑด๋ฌธ์ด ๋ณต์žกํ•ฉ๋‹ˆ๋‹ค. ๊ฐ€๋…์„ฑ์„ ์œ„ํ•ด ๋ณ„๋„ ํ•จ์ˆ˜๋กœ ๋ถ„๋ฆฌํ•˜๊ฑฐ๋‚˜ ๋ณ€์ˆ˜์— ํ• ๋‹นํ•˜์—ฌ ์˜๋ฏธ๋ฅผ ๋ช…ํ™•ํžˆ ํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

Suggested change
if (
(titleResult.includes(parsedTitle.slice(0, 2)) ||
titleResult.includes(parsedTitle.slice(-2))) &&
(artistResult.includes(parsedArtist.slice(0, 2)) ||
artistResult.includes(parsedArtist.slice(-2)))
) {
const isTitleAndArtistSimilar =
(titleResult.includes(parsedTitle.slice(0, 2)) ||
titleResult.includes(parsedTitle.slice(-2))) &&
(artistResult.includes(parsedArtist.slice(0, 2)) ||
artistResult.includes(parsedArtist.slice(-2)));
if (isTitleAndArtistSimilar) {

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +47
if (
(titleResult.includes(parsedTitle.slice(0, 2)) ||
titleResult.includes(parsedTitle.slice(-2))) &&
(artistResult.includes(parsedArtist.slice(0, 2)) ||
artistResult.includes(parsedArtist.slice(-2)))
) {
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋™์ผํ•œ ๋ณต์žกํ•œ ์กฐ๊ฑด๋ฌธ์ด ๋ฐ˜๋ณต๋ฉ๋‹ˆ๋‹ค. crawlYoutubeValid.ts์™€ ๋™์ผํ•œ ๋กœ์ง์ด๋ฏ€๋กœ ๊ณตํ†ต ํ•จ์ˆ˜๋กœ ์ถ”์ถœํ•˜์—ฌ ์ค‘๋ณต์„ ์ œ๊ฑฐํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

Suggested change
if (
(titleResult.includes(parsedTitle.slice(0, 2)) ||
titleResult.includes(parsedTitle.slice(-2))) &&
(artistResult.includes(parsedArtist.slice(0, 2)) ||
artistResult.includes(parsedArtist.slice(-2)))
) {
if (isTitleAndArtistMatch(parsedTitle, parsedArtist, titleResult, artistResult)) {

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,11 @@
export const parseNumber = (str: string) => {
if (!isNumber(str)) {
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ธฐ์กด์— ์žˆ๋˜ ๊ธธ์ด ๊ฒ€์ฆ ๋กœ์ง(str.length < 5)์ด ์ œ๊ฑฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด ๋ณ€๊ฒฝ์ด ์˜๋„๋œ ๊ฒƒ์ธ์ง€ ํ™•์ธํ•˜๊ณ , ๋งŒ์•ฝ ๊ธธ์ด ๊ฒ€์ฆ์ด ํ•„์š”ํ•˜๋‹ค๋ฉด ๋‹ค์‹œ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

Suggested change
if (!isNumber(str)) {
if (!isNumber(str) || str.length >= 5) {

Copilot uses AI. Check for mistakes.
.order("title", { ascending: true })
.from('songs')
.select('id, title, artist, num_tj, num_ky')
.is('num_ky', null) // num_ky๊ฐ€ null์ธ ๋ฐ์ดํ„ฐ๋งŒ ๊ฐ€์ ธ์˜ด
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ •๋ ฌ ๊ธฐ์ค€์ด 'title'์—์„œ 'created_at'์œผ๋กœ ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด ๋ณ€๊ฒฝ์ด ์˜๋„๋œ ๊ฒƒ์ธ์ง€ ํ™•์ธํ•˜๊ณ , ๋งŒ์•ฝ ์„ฑ๋Šฅ์ƒ ์ด์œ ๊ฐ€ ์žˆ๋‹ค๋ฉด ์ฃผ์„์— ๊ทธ ์ด์œ ๋ฅผ ๋ช…์‹œํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

Suggested change
.is('num_ky', null) // num_ky๊ฐ€ null์ธ ๋ฐ์ดํ„ฐ๋งŒ ๊ฐ€์ ธ์˜ด
.is('num_ky', null) // num_ky๊ฐ€ null์ธ ๋ฐ์ดํ„ฐ๋งŒ ๊ฐ€์ ธ์˜ด
// 'created_at' ๊ธฐ์ค€์œผ๋กœ ์ •๋ ฌํ•˜๋Š” ๊ฒƒ์€ ์ตœ๊ทผ์— ์ถ”๊ฐ€๋œ ๊ณก์„ ์šฐ์„ ์ ์œผ๋กœ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•จ์ž…๋‹ˆ๋‹ค. (์˜๋„๋œ ๋ณ€๊ฒฝ)

Copilot uses AI. Check for mistakes.

// return createServerClient(process.env.SUPABASE_URL!, process.env.SUPABASE_ANON_KEY!, {
return createServerClient(process.env.SUPABASE_URL!, process.env.SUPABASE_SERVICE_ROLE_KEY!, {
// process.env.SUPABASE_SERVICE_ROLE_KEY?? ์ถœ์ฒ˜๊ฐ€ ์–ด๋””์ง€?
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SERVICE_ROLE_KEY์—์„œ ANON_KEY๋กœ ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. SERVICE_ROLE_KEY๋Š” ์„œ๋ฒ„ ์ธก์—์„œ ๋ชจ๋“  ๊ถŒํ•œ์„ ๊ฐ€์ง€๋Š” ํ‚ค์ด๋ฏ€๋กœ, ์ด ๋ณ€๊ฒฝ์ด ๋ณด์•ˆ์ƒ ์˜๋„๋œ ๊ฒƒ์ธ์ง€ ํ™•์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +14
const browser = await puppeteer.launch();
const page = await browser.newPage();

Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ธŒ๋ผ์šฐ์ € ์ธ์Šคํ„ด์Šค๊ฐ€ ๋ชจ๋“ˆ ๋ ˆ๋ฒจ์—์„œ ์ดˆ๊ธฐํ™”๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ๋ฉ”๋ชจ๋ฆฌ ๋ˆ„์ˆ˜๋ฅผ ์œ ๋ฐœํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ, ์‚ฌ์šฉ ํ›„ browser.close()๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๋กœ์ง์„ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ํ•จ์ˆ˜ ๋‚ด๋ถ€๋กœ ์ด๋™ํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

Suggested change
const browser = await puppeteer.launch();
const page = await browser.newPage();

Copilot uses AI. Check for mistakes.
@GulSam00 GulSam00 merged commit 6307567 into develop Aug 7, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants