confluence-mdx: 2개 이상의 Confluence Space와 동기화합니다 (이슈 #936)#939
Open
confluence-mdx: 2개 이상의 Confluence Space와 동기화합니다 (이슈 #936)#939
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
d95ea79 to
0dbe62b
Compare
- bin/fetch/sync_profiles.py 신규 추가: SyncProfile 데이터클래스 및 SYNC_PROFILES 딕셔너리 정의 (qm, qcp)
- bin/fetch/config.py: sync_code 필드 추가 (기본값: "qm")
- bin/fetch/config.py: pages_yaml_filename property 추가 (pages.{sync_code}.yaml)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- bin/fetch/processor.py: output_yaml_path를 pages.{sync_code}.yaml로 변경
- bin/fetch_cli.py: --sync-code 인자 추가 (기본값: "qm"), SYNC_PROFILES에서 space_key/start_page_id 기본값 로드
- bin/convert_all.py: --sync-code 인자 추가, --pages-yaml 기본값을 var/pages.{sync_code}.yaml로 자동 도출
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- bin/fetch/processor.py: list_lines 수집 및 list.txt 저장 로직 제거 - bin/convert_all.py: --generate-list 플래그 및 generate_list_files() 함수 제거 - .gitignore: /var/list.txt 항목 제거 - README.md: list.txt 관련 설명 제거, pages.<code>.yaml 명칭으로 업데이트 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- read_fetch_state() → read_fetch_states(): 모든 fetch_state.yaml을 순회하여 (root_id, state) 목록 반환 - format_report(): Fetch State를 Space별(code / root_id)로 구분 출력 - SYNC_PROFILES에서 root_id → code 매핑으로 사람이 읽기 쉬운 코드명 표시 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- api_client.py get_child_pages: folder ID일 때 /api/v2/folders/{id}/children 호출, type=page 필터 제거
- api_client.py get_page_data_v2: folder ID일 때 /api/v2/folders/{id} 호출로 분기
- stages.py Stage1Processor: 기존 page.v2.yaml의 type 필드를 읽어 content_type 결정
- stages.py _build_breadcrumbs: type 조건을 "page" → ("page", "folder")로 확장하여 folder 조상 포함
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- scripts/entrypoint.sh full 커맨드: --sync-code를 파싱하여 convert_all.py에 전달 - scripts/entrypoint.sh full-all 커맨드 추가: qm, qcp Space를 순차 실행 - scripts/entrypoint.sh help 텍스트 업데이트 - compose.yml: 볼륨 마운트를 pages.yaml → pages.qm.yaml로 변경 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
이슈 #936 R1의 파일명 변경 규칙에 따라 기존 pages.yaml을 pages.qm.yaml로 이름을 변경합니다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sync_profiles.py의 qcp 프로필에 start_page_id를 채웁니다. 루트: https://querypie.atlassian.net/wiki/spaces/QCP/folder/887849063 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…이트합니다 R1 파일명 변경(_resolve_page_id, _resolve_attachment_dir)에 따라 reverse_sync_cli.py와 테스트 코드에 남아 있던 pages.yaml 하드코딩을 수정합니다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
resolve_slug_path()가 var/pages.yaml을 하드코딩으로 읽어 --attachment-dir를 결정하는 로직을 pages.qm.yaml 우선 탐색 후 pages.yaml fallback으로 변경합니다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ck을 추가합니다 pages.yaml이 pages.qm.yaml로 이름이 변경됨에 따라, converter가 내부 링크 해석을 위해 pages.yaml을 로드하는 경로를 pages.qm.yaml 우선 탐색 후 pages.yaml fallback으로 변경합니다. 이를 통해 cross-reference 링크가 #link-error로 출력되는 문제를 해결합니다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…public/ 를 .gitignore 에 추가합니다 - /.codegraph/ — CodeGraph가 자동 생성하는 시맨틱 인덱스 DB - confluence-mdx/docs/superpowers/ — Claude Superpowers가 자동 생성하는 스킬 문서 - confluence-mdx/public/ — 재변환 임시 출력 디렉토리 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
docs/superpowers/, public/ 은 개인 로컬 도구가 생성하는 임시 디렉토리로, 팀 공용 .gitignore 대신 .git/info/exclude 로 이동합니다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39b01e8 to
9712421
Compare
SyncProfile에 root_content_type 필드를 추가하고, Stage 1이 page.v2.yaml이
없는 클린 환경에서 루트 페이지를 처리할 때 이 값을 사용하도록 합니다.
QCP Space 루트(887849063)는 folder이므로 root_content_type="folder"로 설정합니다.
기존 동작: page.v2.yaml 없음 → content_type="page" (기본값) → /api/v2/pages/{folder_id}
→ 404 또는 빈 응답 → 첫 QCP fetch 실패
수정 후: page.v2.yaml 없고 루트 페이지이면 → root_content_type → /api/v2/folders/{id}
→ 정상 응답
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
convert_all.py가 --sync-code qcp로 pages.qcp.yaml을 읽지만 하위 converter subprocess에 이 경로를 전달하지 않아 converter/cli.py가 항상 pages.qm.yaml을 로드하는 버그를 수정합니다. - converter/cli.py에 --pages-yaml 옵션을 추가합니다. - convert_all.py가 pages_yaml 경로를 cmd에 포함하여 전달합니다. - test_reverse_sync_e2e.py fixture가 pages.qm.yaml을 복사하도록 수정합니다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
full-all 실행 시 컨테이너 안에서 생성된 pages.qcp.yaml이 호스트에 남지 않는 문제를 수정합니다. pages.qcp.yaml을 호스트와 bind mount하여 컨테이너 종료 후에도 QCP catalog를 호스트 측 도구에서 참조할 수 있도록 합니다. 빈 pages.qcp.yaml placeholder를 추가하여 Docker가 bind mount 대상이 없을 때 빈 디렉토리를 생성하는 동작을 방지합니다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s 기반으로 수정합니다 pages.yaml 하드코딩을 pages.<code>.yaml로 교체합니다. unused_attachments.py: - SYNC_PROFILES import 추가 - --sync-code 인자 추가 (choices=SYNC_PROFILES.keys(), 기본값 qm) - load_pages_yaml이 pages.<sync_code>.yaml을 로드하고 pages.yaml을 fallback으로 사용 - find_unused_attachments에 sync_code 파라미터 전파 link_resolver.py: - SYNC_PROFILES import 추가 - LinkResolver 기본 경로를 pages.<default_code>.yaml로 변경하고 pages.yaml fallback 유지 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…칙에 맞게 수정합니다 find_mdx_with_text.py: - --sync-code 인자 추가 (choices=SYNC_PROFILES.keys(), 기본값 qm) - --pages-yaml 기본값을 None으로 변경하고, sync_code로부터 자동 파생 (pages.<code>.yaml 우선, pages.yaml fallback) README.md: - convert_all.py 설명의 var/pages.yaml → var/pages.<code>.yaml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_key 기반으로 생성합니다
--sync-code qcp 사용 시 결과 링크가 spaces/QM/pages로 고정되는 버그를 수정합니다.
SYNC_PROFILES[sync_code].space_key에서 space_key를 파생하여
spaces/{SPACE_KEY}/pages/{page_id} 형식으로 링크를 생성합니다.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Description
이슈 #936 요구사항을 구현합니다. QM Space에 더해 QCP Space를 추가적으로 동기화할 수 있는 멀티 Space 지원 기능을 추가합니다.
커밋별 변경 내용
R2 — SyncProfile 정의 및 Config에 sync_code 필드 추가
bin/fetch/sync_profiles.py신규:SyncProfile데이터클래스 및SYNC_PROFILES딕셔너리 (qm, qcp)bin/fetch/config.py:sync_code,root_content_type필드 추가,pages_yaml_filenameproperty 추가R1 — pages.yaml 파일명을 Space 코드 기반으로 분리
bin/fetch/processor.py:pages.{sync_code}.yaml파일명 사용bin/fetch_cli.py:--sync-code인자 추가 (기본:"qm"), SYNC_PROFILES에서space_key/start_page_id/root_content_type기본값 로드bin/convert_all.py:--sync-code인자 추가,--pages-yaml기본값 자동 도출bin/converter/cli.py:--pages-yaml옵션 추가, subprocess에 catalog 경로 전달R4 — list.txt 생성 기능 제거
processor.py:list_lines수집 및list.txt저장 로직 제거convert_all.py:--generate-list플래그 및generate_list_files()제거.gitignore:/var/list.txt항목 제거README.md:list.txt관련 설명 제거R5 — image_status.py fetch_state Space별 분리
read_fetch_state()→read_fetch_states(): 모든fetch_state.yaml순회[code / root_id]형식으로 Space별 구분 출력R6 — Confluence folder content type 처리
api_client.py: folder ID 시/api/v2/folders/{id}/children및/api/v2/folders/{id}호출stages.py: folder 루트 첫 실행 시root_content_type사용 (pages.v2.yaml 없는 클린 환경 대응)stages.py:_build_breadcrumbs의type == "page"→type in ("page", "folder")entrypoint + compose 멀티 Space 지원
scripts/entrypoint.sh:full커맨드에--sync-code파싱 추가,full-all커맨드 신규 (qm, qcp 순차 실행)compose.yml:pages.qm.yaml,pages.qcp.yamlbind mount 추가보조 도구 일관성 적용
bin/unused_attachments.py:--sync-code인자 추가,pages.<code>.yaml로드bin/mdx_to_storage/link_resolver.py: 기본 경로를pages.<default_code>.yaml로 변경bin/find_mdx_with_text.py:--sync-code인자 추가,pages.<code>.yaml로드README.md:var/pages.yaml→var/pages.<code>.yaml로 업데이트QCP Space 루트 페이지 ID
bin/fetch/sync_profiles.py: QCP 루트887849063(https://querypie.atlassian.net/wiki/spaces/QCP/folder/887849063),root_content_type="folder"등록Added/updated tests?
tests/test_reverse_sync_cli.py:pages.yamlfixture →pages.qm.yaml로 업데이트tests/test_reverse_sync_e2e.py: fixture가pages.qm.yaml을 복사하도록 수정Additional notes
var/pages.qm.yaml: 기존var/pages.yaml에서 git mvvar/pages.qcp.yaml: 빈 placeholder 파일 추가 (Docker bind mount 시 디렉토리 생성 방지)