chore(git): Gitea PR 헬퍼 — UTF-8 안전 생성/수정/머지 도구 #42

Merged
gahusb merged 1 commits from chore/gitea-pr-tool into main 2026-06-12 10:48:29 +09:00
Owner

요약

PR #34~41의 제목·본문 한글이 깨져 올라간 사고의 재발 방지 도구.

원인

Windows에서 bash 인라인 curl -d '{"title":"한글…"}' 본문이 셸 경계에서 CP949로 인코딩되어 전송 → Gitea가 잘못된 UTF-8을 �로 대체.

해결 — tools/git/gitea-pr.mjs

  • 제목/본문은 UTF-8 spec JSON 파일로만 입력 (인라인 셸 문자열 금지)
  • Node fetchapplication/json; charset=utf-8로 전송
  • git credential fill(GCM)에서 토큰 자동 취득, 401 시 1회 재시도
  • 명령: create <spec.json> / edit <번호> <spec.json> / merge <번호> / show <번호>

조치 완료

  • 깨졌던 PR #34~41 제목·본문 전부 이 도구로 복구
  • 이 PR 자체가 본 도구로 생성됨 (한글 정상 여부 = 검증)

🤖 Generated with Claude Code

## 요약 PR #34~41의 제목·본문 한글이 깨져 올라간 사고의 재발 방지 도구. ### 원인 Windows에서 bash 인라인 `curl -d '{"title":"한글…"}'` 본문이 셸 경계에서 CP949로 인코딩되어 전송 → Gitea가 잘못된 UTF-8을 �로 대체. ### 해결 — `tools/git/gitea-pr.mjs` - 제목/본문은 **UTF-8 spec JSON 파일**로만 입력 (인라인 셸 문자열 금지) - Node `fetch`가 `application/json; charset=utf-8`로 전송 - `git credential fill`(GCM)에서 토큰 자동 취득, 401 시 1회 재시도 - 명령: `create <spec.json>` / `edit <번호> <spec.json>` / `merge <번호>` / `show <번호>` ### 조치 완료 - 깨졌던 PR #34~41 제목·본문 전부 이 도구로 복구 - 이 PR 자체가 본 도구로 생성됨 (한글 정상 여부 = 검증) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gahusb added 1 commit 2026-06-12 10:48:17 +09:00
Windows 셸 인라인 curl -d 본문이 CP949로 전송되어 PR #34~41 한글이
깨진 사고 재발 방지. 제목/본문은 UTF-8 spec JSON 파일로만 받고
Node fetch가 전송. git credential(GCM)에서 토큰 자동 취득·401 재시도.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gahusb merged commit d7e4e88182 into main 2026-06-12 10:48:29 +09:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gahusb/maplecontest#42