diff --git a/docs/workflow.md b/docs/workflow.md index 0183368..7d446ee 100644 --- a/docs/workflow.md +++ b/docs/workflow.md @@ -13,6 +13,57 @@ **Never commit directly to `main`.** This policy applies to all changes, no exceptions. +## Gitea CLI Formatting Troubleshooting + +Issue/PR 본문 작성 시 줄바꿈(`\n`)이 문자열 그대로 저장되는 문제가 반복될 수 있다. 원인은 `-d "...\n..."` 형태에서 쉘/CLI가 이스케이프를 실제 개행으로 해석하지 않기 때문이다. + +권장 패턴: + +```bash +ISSUE_BODY=$(cat <<'EOF' +## Summary +- 변경 내용 1 +- 변경 내용 2 + +## Why +- 배경 1 +- 배경 2 + +## Scope +- 포함 범위 +- 제외 범위 +EOF +) + +tea issues create \ + -t "docs: 제목" \ + -d "$ISSUE_BODY" +``` + +PR도 동일하게 적용: + +```bash +PR_BODY=$(cat <<'EOF' +## Summary +- ... + +## Validation +- python3 scripts/validate_ouroboros_docs.py +EOF +) + +tea pr create \ + --base main \ + --head feature/issue-N-something \ + --title "docs: ... (#N)" \ + --description "$PR_BODY" +``` + +금지 패턴: + +- `-d "line1\nline2"` (웹 UI에 `\n` 문자 그대로 노출될 수 있음) +- 본문에 백틱/괄호를 인라인로 넣고 적절한 quoting 없이 즉시 실행 + ## Agent Workflow **Modern AI development leverages specialized agents for concurrent, efficient task execution.** diff --git a/workflow/issue-271-runlog.md b/workflow/issue-271-runlog.md new file mode 100644 index 0000000..c3f8072 --- /dev/null +++ b/workflow/issue-271-runlog.md @@ -0,0 +1,37 @@ +# Issue #271 Workflow Run Log + +## 2026-02-26 + +### Step 1: Gitea issue creation +- Attempt 1: Succeeded, but formatting degraded + - Command style: `tea issues create -t ... -d "...\n..."` + - Symptom: Issue body rendered literal `\n` text in web UI instead of line breaks +- Root cause + - `tea` does not provide `--description-file` + - Shell-escaped `\n` inside double quotes is passed as backslash+n text +- Resolution + - Build body with heredoc and pass as variable (`-d "$ISSUE_BODY"`) + +### Step 2: PR description creation +- Attempt 1: Succeeded, but same newline rendering risk detected +- Resolution + - Same heredoc variable pattern applied for PR body (`--description "$PR_BODY"`) + +### Preventive Action +- `docs/workflow.md` updated with "Gitea CLI Formatting Troubleshooting" section +- Standard command templates added for issues and PRs + +### Reusable Safe Template +```bash +ISSUE_BODY=$(cat <<'EOF' +## Summary +- item A +- item B + +## Scope +- docs only +EOF +) + +tea issues create -t "title" -d "$ISSUE_BODY" +```