develop 병합 PR 연결 Issue 자동 종료 자동화 - #37
Merged
Merged
Conversation
exijn
marked this pull request as ready for review
August 31, 2026 07:11
exijn
marked this pull request as draft
August 31, 2026 07:13
exijn
marked this pull request as ready for review
August 31, 2026 07:14
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.
✨ 작업 내용
develop에 병합된 PR 본문의 공식 closing keyword를 해석해 같은 저장소의 연결 Issue를 자동으로 종료하는 GitHub Actions를 추가했습니다. 기본 브랜치main과 기존 Git Flow 및 CI는 유지합니다.🔍 리뷰 시 참고사항
배경과 정책
feature/*→developPR의 Issue가 병합 후에도 남는 문제를 해결합니다.pull_request의closed이벤트에서 실제 병합 여부를 확인하고, base가 정확히develop인 경우에만 처리합니다.main은 운영·배포 안정 브랜치이자 GitHub 기본 브랜치로 유지합니다.develop → main릴리스 PR은 이 자동화의 대상이 아닙니다.main에서 생성했으며, 이 PR이main에 병합된 이후부터 자동화가 활성화됩니다.지원 범위
close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved를 대소문자 구분 없이 지원합니다.Closes #32,CLOSES: #32,Resolves: #34형식과 각 Issue에 keyword를 반복한 다중 참조를 지원합니다.Refs,Related, 단순#N, 코드 블록·인라인 코드·HTML 주석·URL·다른 저장소 참조·존재하지 않는 Issue·Pull Request 번호·비공식Closes #1, #2축약형은 처리하지 않습니다.open상태를 확인한 뒤completed사유로 닫습니다.멱등성 및 실패 처리
auto-close-develop-pr:<number>)가 있는 감사 Comment는 다시 작성하지 않습니다.보안
contents: read,pull-requests: read,issues: write만 부여합니다.GITHUB_TOKEN만 사용하며 PAT·추가 Secret·pull_request_target을 사용하지 않습니다.main을 명시적으로 Checkout해 신뢰된 자동화 모듈만 실행합니다.GITHUB_TOKENIssue 쓰기 제한을 우회하지 않도록 자동 종료 대상에서 제외합니다.eval이나 전체 Event Payload 로그를 사용하지 않습니다.변경 파일과 문서
.github/workflows/close-develop-issues.yml.github/scripts/close-develop-issues.js.github/scripts/close-develop-issues.test.js.github/PULL_REQUEST_TEMPLATE.md:Closes #이슈번호예시로 보완docs/GIT_FLOW.md: 브랜치 전략, Issue 연결 규칙, 자동화 조건과 동기화 절차 문서화소급 정리
develop에 병합되고 본문에Close #32가 있어 감사 Comment를 남긴 뒤completed사유로 종료했습니다.develop에 병합되고 본문에Close #34가 있으며, 이미completed사유로 닫힌 상태임을 확인했습니다.main에 병합될 때 닫히도록 아래에Closes #36을 명시했습니다.테스트 및 검증
git diff --check통과./gradlew test전체 통과./gradlew test는 JDK 23 격리 환경에서 컴파일·테스트 클래스 생성까지 통과했으나, 기존MuddaApplicationTests가 Testcontainers의 Docker 데몬을 찾지 못해 1개 실패했습니다. 로컬 Docker 데몬 부재에 따른 환경 제한이며 변경한 파서 테스트는 모두 통과했습니다.actionlint는 환경에 설치되어 있지 않아 공식 YAML 구조와 로컬 YAML 파서로 검증했습니다.자체 코드 리뷰
developPR만 처리하는 조건, 공식 keyword 파싱, 같은 저장소 Issue 검증, API 실패 격리, marker 기반 멱등성, 최소 권한, PR Head 미실행을 확인했습니다. 로컬 모듈 실행 경로를GITHUB_WORKSPACE와mainCheckout으로 명시했습니다.AGENTS.md·CLAUDE.md, main 기본 브랜치와 Git Flow, 기존 CI, PR 템플릿 최소 변경, Secret/PAT 미사용,pull_request_target미사용, Fork 제한, 문서·테스트 범위와 임시 파일 미포함을 재확인했습니다. Markdown 들여쓰기 코드 블록도 제외하도록 파서를 보완했습니다.부트스트랩 및 후속 작업
main대상 인프라 PR이며,develop의 미출시 기능을 포함하지 않습니다.main에 병합된 이후부터develop병합 PR의 자동 종료가 활성화됩니다.main → develop동기화가 필요합니다.✅ 체크리스트
.env.example등) 변경이 필요한 경우 작성 또는 수정했나요?📎 관련 이슈(선택)