설치 가이드

  1. 계정 신청: etudes0803@gmail.com 로 팀 이름·이메일·저장소를 보내 주시면 계정을 열고 api_key 를 회신합니다(공개 가입은 아직 열지 않았습니다)
  2. POST /api/repos 로 저장소 등록 → webhook_secret 수령(이것도 1회만 노출).
    GitHub 토큰은 fine-grained PAT — Repository access 는 그 저장소만, Permissions 는 Pull requests: Read(파일·커밋 목록) + Issues: Read and write(요약 댓글). Metadata: Read 는 자동 포함. 등록할 때 토큰이 저장소와 PR 목록을 읽을 수 있는지 확인합니다.
    curl -X POST https://<host>/api/repos -H "X-Api-Key: prb_..." -H "Content-Type: application/json" \
      -d '{"full_name":"owner/repo","github_token":"github_pat_..."}'
  3. GitHub repo → Settings → Webhooks → Add webhook
    Payload URL https://<host>/webhooks/github, Content type application/json, Secret은 발급받은 webhook_secret, 이벤트는 Pull requests만
  4. PR 을 열면 봇 댓글. 아래 조회는 모두 헤더 X-Api-Key: prb_... 가 필요합니다: 사용량 GET /api/usage, 처리 기록 GET /api/events?status=failed, PR 요약 GET /api/pull-requests/{owner}/{repo}/{번호}

안 될 때