Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/sync-pr-to-notion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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]

jobs:
sync-notion:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 22.17.1

- uses: pnpm/action-setup@v2
with:
version: 10.13.1
run_install: true

- run: pnpm exec tsx scripts/sync-notion.ts
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_DATABASE_ID: ${{ secrets.NOTION_DATABASE_ID }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Node.js
node_modules/
Comment on lines +1 to +2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider adding the dist directory to .gitignore to prevent committing compiled build artifacts. This is a common practice to keep the repository clean.

# Node.js
node_modules/

# Build output
dist/

12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
# org-actions-template
노션 - 깃허브 연동을 위한 자동화 레포지토리

## 설정
notion 설정
- 식별할 수 있는 기본키 이름이 ID여야 합니다.
![기본키](assets/id.png)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The image assets/id.png is referenced but not included in the pull request. Ensure the image is added to the repository to avoid a broken link in the README.


github secret 설정
- 노션 데이터베이스 아이디를 레포지토리 시크릿 키로 저장해야 합니다. 데이터베이스 아이디는 노션 링크의 숫자 부분입니다.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The setup instructions should include setting NOTION_TOKEN as a repository secret, as the script requires it for Notion API authentication.

- 시크릿 키 이름은 `NOTION_DATABASE_ID`로 설정해야 합니다.
```
https://www.notion.so/example/example-227402b843138042a10ec85b1ec04aaf 에서 227402b843138042a10ec85b1ec04aaf 부분
```
Binary file added assets/id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "org-actions-template",
"version": "1.0.0",
"type": "module",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "tsx scripts/sync-notion.ts"
},
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/github": "^5.0.0",
"@notionhq/client": "^4.0.1",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The @notionhq/client dependency is set to ^4.0.1, which may be an unstable version. Consider using the latest stable version to avoid potential issues.

    "@notionhq/client": "latest",

"tsx": "^3.12.7"
},
"devDependencies": {
"typescript": "^5.0.4"
}
}
Loading