Repository navigation
ci(merge-queue): 큐 투입을 사람 토큰으로 해 merge_group CI 가 돌게 한다 (#2254) - #2255
Merged
Merged
Conversation
GITHUB_TOKEN 으로 넣은 큐 항목은 merge_group CI 를 띄우지 못해 큐 맨 앞을 60분 붙잡고 CI_TIMEOUT 으로 빠진다. 자동 머지 예약은 MERGE_QUEUE_TOKEN 으로 하고, 방출 처리의 재투입은 시크릿을 쓰는 workflow_dispatch 워크플로로 넘긴다. 시크릿이 없으면 GITHUB_TOKEN 으로 넣지 않는다.
Contributor
|
형제 충돌이 해소됐다 — 지금은 이 PR 과 같은 파일을 서로 다르게 고친 열린 PR 이 없다 (#1750). |
# Conflicts: # .github/scripts/find-viewed-auto-merge-targets.test.mjs
OnlyReadOneBook
marked this pull request as ready for review
October 5, 2026 05:38
Contributor
|
이 PR 은
|
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.
핵심 파일:
.github/workflows/viewed-auto-merge.yml: auto-merge 예약·큐 투입 토큰을MERGE_QUEUE_TOKEN으로 바꿈.github/workflows/merge-queue-requeue.yml: 새 파일. 사람 토큰으로 재투입하는workflow_dispatch워크플로.github/scripts/handle-merge-queue-dequeue.mjs: 방출 처리는 판정·마커까지만 하고 재투입은 dispatch 로 넘김.github/workflows/merge-queue-dequeue.yml: dispatch 권한(actions: write)과DEFAULT_BRANCH추가📌𝘐𝘴𝘴𝘶𝘦𝘴
📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯
GITHUB_TOKEN으로 큐에 넣거나 auto-merge 를 예약하면 GitHub 이 그 이벤트로 워크플로를 띄우지 않아 merge group 에 체크가 하나도 생기지 않습니다. 10/05 refactor(afternote): 미디어 URL 빈 값 정규화를 입구로 모은다 (#2207) #2208 이 그렇게 60분 동안 큐 맨 앞을 막았고, 뒤의 fix(core): 비밀번호 불일치 시 세션 유지 (#2222) #2229·fix(core): 로그아웃이 취소돼도 로컬 세션 정리를 끝낸다 (#2243) #2244 는 초록이 된 뒤에도 기다리다 처음부터 다시 검증했습니다. 같은 날 본인 계정으로 넣은 PR 4건은 17~20분 만에 머지됐습니다(ci(merge-queue): GITHUB_TOKEN 으로 큐에 넣은 PR 은 merge_group CI 가 돌지 않아 60분 막힌다 #2254 에 시각표).viewed-auto-merge.yml: 예약을secrets.MERGE_QUEUE_TOKEN으로 합니다. 시크릿이 없으면GITHUB_TOKEN으로 대신 넣지 않고 경고만 남깁니다. 쓰기를 더 하지 않으므로 job 권한을contents: read로 줄였습니다.merge-queue-dequeue.yml:pull_request_target브리지라 시크릿을 쓰지 않는 불변식(create-ci-config.test.mjs)은 그대로 둡니다. 판정과 마커 코멘트는 지금처럼 여기서 하고, 투입만merge-queue-requeue.yml에 dispatch 합니다.workflow_dispatch는GITHUB_TOKEN으로 보내도 실행되는 예외입니다.merge-queue-requeue.yml: dispatch 를 받아 live 상태를 다시 보고, 판정한 head 그대로 열려 있고 큐 밖이며 스택 위쪽이 아닐 때만MERGE_QUEUE_TOKEN으로 넣습니다. 투입 방식(스택은 merge-async, 나머지는 GraphQL)은 기존 코드를performRequeue로 옮겨 그대로 씁니다. 시크릿이 없으면 직접 투입 명령을 코멘트로 남기고 job 을 red 로 끝냅니다.handleDequeue는requeue위임을 받으면 그것을 부르고, 없으면 종전처럼 직접 넣습니다. 기존 재투입 테스트는 그대로 통과합니다.검증(로컬):
node --test .github/scripts/*.test.mjs811건 통과.handleDequeue가 위임을 무시하게 바꾸면 새 위임 테스트가,GH_TOKEN을github.token으로 되돌리면 자동 머지 워크플로 정책 테스트가 실패합니다.머지 전 필요: 저장소 Actions 시크릿
MERGE_QUEUE_TOKEN(1hyok 의 fine-grained PAT, 이 저장소 한정, Contents·Pull requests 쓰기). 없으면 자동 머지 예약이 멈추고 재투입은 안내 코멘트로 바뀝니다.🧪 CI Test Plan
{ "androidTest": { "mode": "none", "reason": "변경은 .github/workflows 와 .github/scripts 의 큐 투입 토큰·재투입 경로뿐이고 앱 코드·androidTest·빌드 스크립트를 건드리지 않는다. 스크립트 단위 테스트(node --test)가 회귀를 가드한다.", "tests": [] } }📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵
화면 변경 없음.
💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴
Generated by Claude Code