๋ฐฐ๊ฒฝ
ํ์ฌ ํจํด ๋ถ์ ์ฝ๋ฉํธ (handlers/tag-patterns.js)๋ ๋งค push๋ง๋ค
๊ธฐ์กด ๋ด ์ฝ๋ฉํธ๋ฅผ ์ ๋ถ DELETEํ ๋ค ์๋ก POSTํ๋ ๋ฐฉ์์ผ๋ก ๊ฐฑ์ ๋จ.
๋ฐ๋ฉด ํ์ต ํํฉ ์ฝ๋ฉํธ (utils/learningComment.js upsertLearningStatusComment)๋
marker๋ก ๊ธฐ์กด ์ฝ๋ฉํธ๋ฅผ ์ฐพ์ PATCH๋ก body๋ง ์
๋ฐ์ดํธํ๋ upsert ํจํด์ ์ฌ์ฉ ์ค.
#20 ์์ synchronize ์ต์ ํ๊ฐ ๋ค์ด๊ฐ๋ฉด์,
๋ณ๊ฒฝ๋ ํ์ผ์ ํ์ ํด์๋ "๊ธฐ์กด ์ฝ๋ฉํธ๋ฅผ edit"ํ๋ ํํ๊ฐ ์์ฐ์ค๋ฌ์.
์ ์
๋ณ๊ฒฝ๋ ํ์ผ์ ํจํด ๋ถ์ ์ฝ๋ฉํธ๋ฅผ delete + repost โ PATCH (edit in place) ๋ก ์ ํ.
- PR review ์ฝ๋ฉํธ๋
PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}๋ก body ์์ ๊ฐ๋ฅ
- ํ์ผ๋ช
(
comment.path)์ ํค๋ก ๊ธฐ์กด ๋ด ์ฝ๋ฉํธ๋ฅผ ์ฐพ์ upsert
- ์กด์ฌํ๋ฉด
PATCH body
- ์์ผ๋ฉด
POST (์ ๊ท ํ์ผ)
๊ธฐ๋ ํจ๊ณผ
- delete โ create๋ก ์ธํ ์๋ฆผ/์นํ
๋
ธ์ด์ฆ ์ ๊ฑฐ
- ํ์ต ํํฉ ์ฝ๋ฉํธ์ ์ผ๊ด๋ upsert ํจํด์ผ๋ก ์ฝ๋ ๋จ์ํ
- ์ฝ๋ฉํธ ID๊ฐ push ๊ฐ์ ์์ ์ ์ผ๋ก ์ ์ง๋จ (์๊ตฌ ๋งํฌ ๊ฐ๋ฅ)
์ฐธ๊ณ
Trade-off (์์ ์ด์, blocker ์๋)
PATCH๋ commit_id๋ฅผ ๋ฐ๊พธ์ง ์์ผ๋ฏ๋ก, ์๋ณธ ์ปค๋ฐ์ด history์์ ๋ฉ์ด์ง๋ฉด
GitHub UI๊ฐ "Outdated" ๋ฐฐ์ง๋ฅผ ๋ถ์ผ ์ ์์. subject_type: "file" ์ฝ๋ฉํธ๋
๋ผ์ธ ์ฝ๋ฉํธ๋ณด๋ค ๋ aggressiveํ๊ฒ ์ฒ๋ฆฌ๋๋ ํธ์ด๋ผ ์ค์ฌ์ฉ์ ํฐ ๋ฌธ์ ์์ ๊ฒ์ผ๋ก ์์.
๋ฐฐ๊ฒฝ
ํ์ฌ ํจํด ๋ถ์ ์ฝ๋ฉํธ (
handlers/tag-patterns.js)๋ ๋งค push๋ง๋ค๊ธฐ์กด ๋ด ์ฝ๋ฉํธ๋ฅผ ์ ๋ถ
DELETEํ ๋ค ์๋กPOSTํ๋ ๋ฐฉ์์ผ๋ก ๊ฐฑ์ ๋จ.๋ฐ๋ฉด ํ์ต ํํฉ ์ฝ๋ฉํธ (
utils/learningComment.jsupsertLearningStatusComment)๋marker๋ก ๊ธฐ์กด ์ฝ๋ฉํธ๋ฅผ ์ฐพ์
PATCH๋ก body๋ง ์ ๋ฐ์ดํธํ๋ upsert ํจํด์ ์ฌ์ฉ ์ค.#20 ์์
synchronize์ต์ ํ๊ฐ ๋ค์ด๊ฐ๋ฉด์,๋ณ๊ฒฝ๋ ํ์ผ์ ํ์ ํด์๋ "๊ธฐ์กด ์ฝ๋ฉํธ๋ฅผ edit"ํ๋ ํํ๊ฐ ์์ฐ์ค๋ฌ์.
์ ์
๋ณ๊ฒฝ๋ ํ์ผ์ ํจํด ๋ถ์ ์ฝ๋ฉํธ๋ฅผ delete + repost โ PATCH (edit in place) ๋ก ์ ํ.
PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}๋ก body ์์ ๊ฐ๋ฅcomment.path)์ ํค๋ก ๊ธฐ์กด ๋ด ์ฝ๋ฉํธ๋ฅผ ์ฐพ์ upsertPATCHbodyPOST(์ ๊ท ํ์ผ)๊ธฐ๋ ํจ๊ณผ
์ฐธ๊ณ
utils/learningComment.js:232upsertLearningStatusCommenthandlers/tag-patterns.js:75,104-154Trade-off (์์ ์ด์, blocker ์๋)
PATCH๋
commit_id๋ฅผ ๋ฐ๊พธ์ง ์์ผ๋ฏ๋ก, ์๋ณธ ์ปค๋ฐ์ด history์์ ๋ฉ์ด์ง๋ฉดGitHub UI๊ฐ "Outdated" ๋ฐฐ์ง๋ฅผ ๋ถ์ผ ์ ์์.
subject_type: "file"์ฝ๋ฉํธ๋๋ผ์ธ ์ฝ๋ฉํธ๋ณด๋ค ๋ aggressiveํ๊ฒ ์ฒ๋ฆฌ๋๋ ํธ์ด๋ผ ์ค์ฌ์ฉ์ ํฐ ๋ฌธ์ ์์ ๊ฒ์ผ๋ก ์์.