Skip to content

feat: Discord-GitHub-Notion 통합 Worker 구현#26

Merged
alphago2580 merged 3 commits intomainfrom
feature/discord-github-worker
Feb 8, 2026
Merged

feat: Discord-GitHub-Notion 통합 Worker 구현#26
alphago2580 merged 3 commits intomainfrom
feature/discord-github-worker

Conversation

@alphago2580
Copy link
Owner

Summary

  • Python placeholder를 TypeScript/Cloudflare Workers 기반 통합 Worker로 교체
  • GitHub ↔ Discord ↔ Notion 3-way 양방향 동기화 구현
  • Discord 슬래시 커맨드 (/issue create, /comment, /sync) 지원

주요 기능

  • 이슈 동기화: GitHub 이슈 생성 → Discord 포럼 포스트 + Notion 페이지 자동 생성
  • 댓글 동기화: GitHub ↔ Discord 양방향 댓글 동기화 (무한 루프 방지)
  • 이슈 생성: Discord Modal 폼으로 GitHub 이슈 직접 생성 (라벨 지원)
  • PR 알림: PR opened/closed/merged 시 Discord Embed 알림
  • Notion 연동: 이슈 상태 변경 시 Notion 데이터베이스 자동 업데이트

기술 스택

  • Cloudflare Workers (서버리스)
  • TypeScript
  • KV Namespace (양방향 매핑 저장)
  • GitHub App 인증 (JWT + Installation Token)

Test plan

  • GitHub 이슈 생성 → Discord 포럼 포스트 생성 확인
  • GitHub 댓글 → Discord 포스트 댓글 동기화 확인
  • /comment 명령으로 Discord → GitHub 댓글 전송 확인
  • /issue create Modal 폼으로 GitHub 이슈 생성 확인
  • Notion 데이터베이스 페이지 생성 확인
  • 이슈 close/reopen 시 Notion 상태 업데이트 확인

🤖 Generated with Claude Code

- GitHub 이슈 → Discord 포럼 포스트 자동 생성
- GitHub 댓글 ↔ Discord 포스트 양방향 동기화
- /issue create: Discord에서 Modal 폼으로 GitHub 이슈 생성 (라벨 지원)
- /comment: Discord에서 GitHub 이슈로 댓글 전송
- /sync: 현재 포스트의 연결된 GitHub 이슈 확인
- PR 이벤트 Discord 알림 (opened/closed/merged)
- Notion 데이터베이스 동기화 (이슈 생성/상태 업데이트)
- KV 기반 양방향 매핑 (issue ↔ post ↔ notion)
- 슬래시 커맨드 등록 스크립트 추가
- CLAUDE.md 프로젝트 가이드 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alphago2580
Copy link
Owner Author

@claude @copilot 리뷰해

Copy link
Contributor

Copilot AI commented Feb 8, 2026

@alphago2580 I've opened a new pull request, #27, to work on those changes. Once the pull request is ready, I'll request review from you.

- Env 인터페이스 통합 (index.ts에서 단일 export)
- (env as any) 타입 캐스팅 제거, GITHUB_OWNER/REPO 환경변수로 분리
- mapping.ts split 후 불필요한 regex 제거
- github-api.ts PEM 디버그 로그 제거 (보안)
- GitHub webhook 서명 검증 timing-safe 비교로 변경
- 레거시 Python 파일 삭제 (main.py, requirements.txt, config.example.json)
- README.md 간소화 + docs/README.md 아키텍처 문서 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link

claude bot commented Feb 8, 2026

Code Review

Found 1 CLAUDE.md compliance issue:

Undocumented Environment Variables (discord-github-worker/src/index.ts:13-20)

The Env interface defines several environment variables that are not documented in CLAUDE.md's Environment Variables section (lines 44-49):

  • GITHUB_OWNER (line 13)
  • GITHUB_REPO (line 14)
  • NOTION_API_TOKEN (line 18)
  • NOTION_DATA_SOURCE_ID (line 20)

According to

### Environment Variables
`wrangler.toml``[vars]` 섹션에서 설정:
- `GITHUB_APP_ID`: GitHub App ID
- `DISCORD_FORUM_CHANNEL_ID`: 이슈 동기화용 Discord 포럼 채널 ID
- `DISCORD_PR_CHANNEL_ID`: PR 알림용 Discord 채널 ID
- `NOTION_DATABASE_ID`: Notion 데이터베이스 ID (선택사항)
, the Environment Variables section only lists:

  • GITHUB_APP_ID
  • DISCORD_FORUM_CHANNEL_ID
  • DISCORD_PR_CHANNEL_ID
  • NOTION_DATABASE_ID

Recommendation: Update CLAUDE.md's Environment Variables section to document these additional required variables to maintain consistency between the specification and implementation.

- GITHUB_OWNER, GITHUB_REPO 환경변수 추가
- Secrets 섹션 추가 (NOTION_API_TOKEN, NOTION_DATA_SOURCE_ID 등)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alphago2580 alphago2580 merged commit 3cd7ce6 into main Feb 8, 2026
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