Files
todos2/.claude/skills/gitea-workflow.md
jungwoo choi b54811ad8d Initial commit: 프로젝트 초기 구성
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 06:53:16 +09:00

164 lines
4.2 KiB
Markdown

# Gitea 워크플로우 (Gitea Workflow)
이 프로젝트의 Gitea 리포지토리 관리 워크플로우입니다.
## Gitea 서버 정보
- **URL**: http://gitea.yakenator.io
- **조직**: yakenator
- **사용자**: yakenator
- **비밀번호**: asdfg23we
## 새 리포지토리 생성
### 1. Gitea CLI (tea) 사용
```bash
# tea 설치 (macOS)
brew install tea
# 로그인
tea login add --url http://gitea.yakenator.io --user yakenator --password asdfg23we
# 리포지토리 생성
tea repo create --name {repo-name} --org yakenator --private=false
```
### 2. API 사용
```bash
# 리포지토리 생성
curl -X POST "http://gitea.yakenator.io/api/v1/orgs/yakenator/repos" \
-H "Content-Type: application/json" \
-u "yakenator:asdfg23we" \
-d '{
"name": "{repo-name}",
"description": "서비스 설명",
"private": false,
"auto_init": false
}'
```
### 3. 웹 UI 사용
1. http://gitea.yakenator.io 접속
2. yakenator / asdfg23we 로 로그인
3. yakenator 조직 선택
4. "New Repository" 클릭
5. 리포지토리 정보 입력 후 생성
## 새 프로젝트 초기화 및 푸시
### 전체 워크플로우
```bash
# 1. 프로젝트 디렉토리 생성
mkdir ./repos/{new-service}
cd ./repos/{new-service}
# 2. Git 초기화
git init
# 3. 파일 생성 (Dockerfile, requirements.txt, worker.py 등)
# 4. 첫 커밋
git add -A
git commit -m "Initial commit: {service-name} 서비스 초기 구성
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
# 5. Gitea에 리포지토리 생성 (API)
curl -X POST "http://gitea.yakenator.io/api/v1/orgs/yakenator/repos" \
-H "Content-Type: application/json" \
-u "yakenator:asdfg23we" \
-d '{"name": "{new-service}", "private": false}'
# 6. Remote 추가 및 푸시
git remote add origin http://yakenator:asdfg23we@gitea.yakenator.io/yakenator/{new-service}.git
git branch -M main
git push -u origin main
```
## 기존 리포지토리 클론
```bash
# HTTP 클론 (인증 포함)
git clone http://yakenator:asdfg23we@gitea.yakenator.io/yakenator/{repo-name}.git
# 또는 클론 후 credential 설정
git clone http://gitea.yakenator.io/yakenator/{repo-name}.git
cd {repo-name}
git config credential.helper store
```
## 리포지토리 URL 패턴
```
http://gitea.yakenator.io/yakenator/{repo-name}.git
```
### 현재 등록된 리포지토리
| 서비스 | URL |
|--------|-----|
| news-commons | http://gitea.yakenator.io/yakenator/news-commons.git |
| news-article-generator | http://gitea.yakenator.io/yakenator/news-article-generator.git |
| news-article-translator | http://gitea.yakenator.io/yakenator/news-article-translator.git |
| news-biocode-service | http://gitea.yakenator.io/yakenator/news-biocode-service.git |
| news-google-search | http://gitea.yakenator.io/yakenator/news-google-search.git |
| news-image-generator | http://gitea.yakenator.io/yakenator/news-image-generator.git |
| news-rss-collector | http://gitea.yakenator.io/yakenator/news-rss-collector.git |
| news-tts-generator | http://gitea.yakenator.io/yakenator/news-tts-generator.git |
| news-wikipedia-enrichment | http://gitea.yakenator.io/yakenator/news-wikipedia-enrichment.git |
| news-user-service | http://gitea.yakenator.io/yakenator/news-user-service.git |
| mcp_biocode | http://gitea.yakenator.io/yakenator/mcp_biocode.git |
| base-auth | http://gitea.yakenator.io/yakenator/base-auth.git |
| base-image | http://gitea.yakenator.io/yakenator/base-image.git |
## 커밋 및 푸시
```bash
# 변경사항 확인
git status
# 스테이징 및 커밋
git add -A
git commit -m "$(cat <<'EOF'
feat: 기능 설명
- 변경사항 1
- 변경사항 2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EOF
)"
# 푸시
git push
```
## 브랜치 전략
```bash
# 기본 브랜치: main
# 기능 브랜치: feature/{기능명}
# 버그 수정: fix/{버그설명}
# 브랜치 생성 및 전환
git checkout -b feature/new-feature
# 작업 후 푸시
git push -u origin feature/new-feature
# PR 생성 (웹 UI 또는 API)
```
## 주의사항
- 모든 서비스는 `yakenator` 조직 아래에 생성
- 리포지토리 이름은 `news-{서비스명}` 패턴 사용
- 민감 정보(.env, credentials)는 절대 커밋하지 않음
- .gitignore에 다음 항목 포함:
```
.env
__pycache__/
*.pyc
node_modules/
.DS_Store
```