Skip to content

ci(release): open the release pull request with a least-privilege App token - #921

Merged
yeongseon merged 1 commit into
mainfrom
ci/issue-895-release-app-token
Oct 12, 2026
Merged

yeongseon merged 1 commit into
mainfrom
ci/issue-895-release-app-token

Conversation

@yeongseon

Copy link
Copy Markdown
Collaborator

무엇

2026-10-12 소유자 결정(#895): release-please 가 연 release PR 의 필수 체크는 최소 권한 GitHub App 토큰으로 돌린다. 이 PR 은 kpubdata 워크플로 쪽 준비다.

  • .github/workflows/release-please.yml
    • actions/create-github-app-token@bcd2ba49… (v3.2.0, 커밋 SHA 고정)으로 secret RELEASE_APP_CLIENT_ID · RELEASE_APP_PRIVATE_KEY 에서 설치 토큰을 받는다. 토큰은 permission-contents: write, permission-pull-requests: write 두 가지로만 발급한다.
    • 그 토큰을 release-please 와 release 브랜치 체크아웃(=push) 두 곳에만 넘긴다. 토큰으로 연 PR·push 는 CI 를 시작한다.
    • 안전한 기본값: secret 이 둘 다 없으면 경고(No release App token)를 남기고 지금처럼 GITHUB_TOKEN 으로 돈다 — 오늘 릴리스가 멈추지 않는다. 하나만 있으면 설정이 깨진 것이므로 잡이 실패한다.
    • 쓰이지 않던 RELEASE_PLEASE_TOKEN 경로(저장소에 secret 없음)는 지웠다.
  • 테스트 (tests/unit/scripts/test_release_please.py): SHA 고정, 권한이 정확히 두 가지, 토큰 사용처가 release-please·체크아웃 두 곳뿐(GH_TOKEN 없음), secret 없을 때 경고·하나만 있을 때 실패. tests/unit/test_no_workflow_merges.py 는 그대로 통과 — 어떤 워크플로도 병합·승인하지 않는다.
  • 문서: docs/compatibility.md 5.1 에 secret 이름, App 권한 표, 소유자 설정 단계(App 생성 → 세 저장소에 설치 → secret 추가 → 수동 실행으로 확인). docs/governance/RELEASE_POLICY.md 에 요약. Studio 가 Builder 버전 태그를 계속 따른다는 결정(ADR 0004)도 5.1 에 적었다.
  • CHANGELOG.md: feat(specs): declare per-dataset application requirement in specs #902 항목의 "left open" 을 결정(스키마에 application 필드 없음, 17개 null 은 chore(metadata): confirm the application requirement for the 17 spec datasets recorded as null #920)으로 고쳤다.

릴리스·태그 없음. #890 은 건드리지 않았다. Builder·Studio 의 release-please 이전은 별도 작업이다.

확인

  • ruff check . → All checks passed! / ruff format --check . → 433 files already formatted / mypy src → no issues in 70 source files
  • check_english_comments.py → no Korean comments / check_plain_codes.py → no bare code
  • mkdocs build --strict → built
  • pytest → 3407 passed, 2 failed — 실패 2개(test_build_dataset_verifier.py 의 approval 두 개)는 이 변경 없이 main 에서도 로컬에서 같은 실패(환경 차이로 보임). CI 결과로 확인한다.

Refs #895

🤖 Generated with Claude Code

… token

release-please.yml mints a short-lived installation token with
actions/create-github-app-token (SHA-pinned) from RELEASE_APP_CLIENT_ID and
RELEASE_APP_PRIVATE_KEY, scoped to contents and pull requests write, and gives
it to release-please and the branch checkout so the pull request starts CI.
Without both secrets the job warns and falls back to GITHUB_TOKEN; with only
one it fails. Tests hold the pin, the two permissions, the two uses and the
fallback. docs/compatibility.md 5.1 and RELEASE_POLICY.md list the permissions
and the owner's setup steps.

Refs #895

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yeongseon yeongseon added epic:governance Project governance — policy, labels, CI enforcement review:R2 Public API, builder API, OpenAPI, spec, transformation (POLICY 18.1) labels Oct 12, 2026
@yeongseon
yeongseon merged commit 13b9046 into main Oct 12, 2026
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

epic:governance Project governance — policy, labels, CI enforcement review:R2 Public API, builder API, OpenAPI, spec, transformation (POLICY 18.1)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant