hotfix: skip webhook registration without admin access - #170
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
작업 유형
관련 마일스톤
개요
Closes #169.
저장소 연동 시 사용자가 해당 GitHub 저장소의 관리자 권한이 없으면 webhook 생성 API가 403을 반환하던 문제를 수정합니다. GitHub 저장소 목록에서
permissions.admin값을 받아 연결 요청에 전달하고, 서버에서는 관리자 권한이 확인된 경우에만 webhook 등록을 시도합니다.변경 사항
canAdminister필드를 추가했습니다.canAdminister를 포함했습니다.POST /api/repositories에서canAdminister === true일 때만 webhook 생성을 시도하도록 변경했습니다.스크린샷 (선택)
해당 없음. 서버/API 동작 수정입니다.
테스트
tsc --noEmit)검증 결과:
C:\project\CodeMate\node_modules\.bin\jest.cmd --runInBand: 통과, 22 suites / 132 testsC:\project\CodeMate\node_modules\.bin\tsc.cmd --noEmit: 통과C:\project\CodeMate\node_modules\.bin\eslint.cmd: 에러 0개, 기존 경고 1개 (hooks/useRealtimeComments.ts의 unused var, 본 PR 변경 범위 외)참고 사항
관리자 권한이 없는 저장소는 webhook 기반 자동 이벤트 수신은 등록되지 않지만, 저장소 연동과 PR 동기화는 계속 진행됩니다.