From 4e0e258e8459f6d596eedda8304ab71abfa26ba5 Mon Sep 17 00:00:00 2001 From: sezeme Date: Sun, 3 Aug 2025 21:14:27 +0900 Subject: [PATCH 1/3] refactor: update readme.md --- README.md | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index de657e3..f0ff9ac 100644 --- a/README.md +++ b/README.md @@ -16,32 +16,43 @@ ## 설정 안내 -### 1. Notion 설정 -- **기본키 속성** - - 속성 이름: `ID` (식별용 기본키로 반드시 `ID`여야 합니다) - ![기본키](assets/id.png) +### 1. 대상 레포지토리 설정 +- 본 기능을 사용할 레포지토리에서 아래의 설정코드를 추가합니다. -- **GitHub 링크 연결용 속성** - - 속성 타입: `url` - - 속성 이름: `GitHub Pull Requests` - ![GitHub Pull Requests 속성 예시](assets/github_pr.png) +``` +# .github/workflows/call-notion-sync.yml (사용하는 쪽 레포) +name: Call Notion Sync + +on: + pull_request: + types: [opened, reopened, synchronize, closed] + +jobs: + call-notion-sync: + uses: Beyond-Imagination/github-actions/.github/workflows/sync-notion.yml@main + secrets: + NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} + NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }} +``` --- ### 2. GitHub Secret 설정 -- Notion 데이터베이스 아이디를 레포지토리 시크릿 키로 등록합니다. -- GitHub 시크릿 키 이름: `NOTION_DATABASE_ID` -- 예시 URL: - -``` -https://www.notion.so/example/example-227402b843138042a10ec85b1ec04aaf -``` +- 레포지토리 시크릿 키에 `NOTION_DATABASE_ID` 추가 +- NOTION DATABASE ID 추출 방법 : `https://www.notion.so/example/example-227402b843138042a10ec85b1ec04aaf` → 이 중 227402b843138042a10ec85b1ec04aaf 가 데이터베이스 아이디입니다. +### 에러 시 확인할 부분 +- **기본키 속성** + - 속성 이름: `ID` (식별용 기본키로 반드시 `ID`여야 합니다) + ![기본키](assets/id.png) +- **GitHub 링크 연결용 속성** + - 속성 타입: `url` + - 속성 이름: `GitHub Pull Requests` + ![GitHub Pull Requests 속성 예시](assets/github_pr.png) -### 에러 시 확인할 부분 - 생성일시가 `생성 일시` 인지 확인 - `상태` 속성이 맞는지 확인, `진행 중` 속성, `완료` 속성이 있는지 확인 - 그 외 본 레포지토리의 scripts/sync-notion.ts 코드를 확인해 코드와 다르게 설정한 부분이 있는지 확인 \ No newline at end of file From 78a6b0ffc9e59d8e0beb84a8750538f4f2b78076 Mon Sep 17 00:00:00 2001 From: sezeme Date: Sun, 3 Aug 2025 21:24:10 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=EB=8B=A4=EB=A5=B8=20=EB=A0=88?= =?UTF-8?q?=ED=8F=AC=EC=97=90=EC=84=9C=20=ED=98=B8=EC=B6=9C=ED=95=B4=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=84=A4=EC=A0=95=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/call-notion-sync.yml | 12 ++++++++++++ .github/workflows/sync-pr-to-notion.yml | 21 ++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/call-notion-sync.yml diff --git a/.github/workflows/call-notion-sync.yml b/.github/workflows/call-notion-sync.yml new file mode 100644 index 0000000..0cdd46a --- /dev/null +++ b/.github/workflows/call-notion-sync.yml @@ -0,0 +1,12 @@ +name: Call Notion Sync + +on: + pull_request: + types: [opened, reopened, synchronize, closed] + +jobs: + call-notion-sync: + uses: Beyond-Imagination/github-actions/.github/workflows/sync-notion.yml@main + secrets: + NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} + NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }} \ No newline at end of file diff --git a/.github/workflows/sync-pr-to-notion.yml b/.github/workflows/sync-pr-to-notion.yml index 50f4624..a66bfd0 100644 --- a/.github/workflows/sync-pr-to-notion.yml +++ b/.github/workflows/sync-pr-to-notion.yml @@ -1,21 +1,12 @@ name: Sync PR to Notion on: - # 다른 레포에서 호출하는 로직 - # workflow_call: - # secrets: - # NOTION_TOKEN: - # required: true - # NOTION_DATABASE_ID: - # required: true - # NOTION_PROP_ID: - # required: true - # NOTION_PROP_STATUS: - # required: true - # NOTION_PROP_PR: - # required: true - pull_request: - types: [opened, reopened, synchronize, closed] + workflow_call: + secrets: + NOTION_TOKEN: + required: true + NOTION_DATABASE_ID: + required: true jobs: sync-notion: From 72efaf4666acddbeda912e1e97c897dd677ed0ae Mon Sep 17 00:00:00 2001 From: sezeme Date: Sun, 3 Aug 2025 21:31:05 +0900 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20=EB=8B=A4=EB=A5=B8=20=EB=A0=88?= =?UTF-8?q?=ED=8F=AC=EC=97=90=EC=84=9C=20=ED=98=B8=EC=B6=9C=ED=95=B4=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=84=A4=EC=A0=95=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/call-notion-sync.yml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .github/workflows/call-notion-sync.yml diff --git a/.github/workflows/call-notion-sync.yml b/.github/workflows/call-notion-sync.yml deleted file mode 100644 index 0cdd46a..0000000 --- a/.github/workflows/call-notion-sync.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Call Notion Sync - -on: - pull_request: - types: [opened, reopened, synchronize, closed] - -jobs: - call-notion-sync: - uses: Beyond-Imagination/github-actions/.github/workflows/sync-notion.yml@main - secrets: - NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} - NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }} \ No newline at end of file