Giter VIP home page Giter VIP logo

notion-github-issue-sync's Introduction

Github Actions x notion-sdk-js x docker

Slide 16_9 - 4

Demo

screencast 2022-02-06 02-55-56

Abstract

notion-sdk-js는 Notion 데이터베이스와 Github의 issue의 를 동기화시켜주는 Node-JS application 입니다.
이를 사용하기 위해선 사용자가 local computer에 dependency module을 install 한 후에
사용자가 직접 node index.js 명령어를 사용해 실행해주어 실행 시점을 기준으로 Notion 데이터베이스와 Github의 issue를 동기화합니다.

사용자의 편의를 향상시키기 위해 해당 Node-JS application을 Dockerizing하여
Notion 데이터베이스와 Github issue 연동을 Github Actions에서 사용자가 쉽게 사용할 수 있게 구성하였습니다.

Usage

아래의 Workflow 정의를 통해
별도의 install 과정 없이 쉽게 여러분의 Repo에서 Github Issue와 Notion 데이터베이스 연동을 구성할 수 있습니다.

on:
  issues:
    types: [opened, reopened, closed, deleted]
jobs:
  build:
    runs-on: ubuntu-latest
    name: "Run github issue notion sync"
    steps:
      - uses: actions/checkout@v2
      - name: create env file
        run: |
          touch .env
          echo PERSONAL_GITHUB_ACCESS_KEY=${{ secrets.PERSONAL_GITHUB_ACCESS_KEY }} >> .env
          echo NOTION_KEY=${{ secrets.NOTION_KEY }} >> .env
          echo NOTION_DATABASE_ID=${{ secrets.NOTION_DATABASE_ID }} >> .env
          echo REPO_OWNER=${{ secrets.REPO_OWNER }} >> .env
          echo REPO_NAME=${{ secrets.REPO_NAME }} >> .env
      - name: docker compose up
        run: docker-compose --env-file .env up

본 Application을 Github Actions에서 사용하기 위해서는 5개의 환경변수(environment variable)를 필요로 합니다.

  1. PERSONAL_GITHUB_ACCESS_KEY: Github Personal Access Token
  2. NOTION_KEY: Notion API KEY
  3. NOTION_DATABASE_ID: Notion Database ID
  4. REPO_OWNER: Github Repository Owner
  5. REPO_NAME: Github Repository Name

STEP 1

  • GitHub Personal Access token을 발급받는 방법은 해당 가이드를 참조해주세요! here.

STEP 2

  • Notion API key를 발급받는 방법은 해당 가이드를 참조해주세요! here

STEP 3

  • NOTION_DATABASE_ID를 발급받기 위해 먼저 해당 DataBase template을 여러분의 Notion workspace에 복제해주세요!

Notion

  • 발급받은 integration을 DataBase template이 있는 Notion에 초대해줍니다.

  • Notion Database ID는 다음과 같습니다.
    해당 Notion Page를 공유했을 때 나오는 link는 다음과 같이 생겼을 것입니다.
    https://www.notion.com/367cd67cfe8f49bfaf0ac21305ebb9bf?v=bc79ca62b36e4c54b655ceed4ef06ebd
    위 링크에서 데이터베이스의 ID는
    367cd67cfe8f49bfaf0ac21305ebb9bf입니다.

  • 아래의 링크에서 long_hash_1이 Notion Database의 ID입니다.
    https://www.notion.so/<long_hash_1>?v=<long_hash_2>
    모든 링크의 패턴이 위와 같습니다.

STEP 4

  • 발급 받은 키들을 Repo의 환경변수로 등록합니다.
  1. 연동을 원하는 Repo의 Settings 탭으로 이동합니다.
  2. Secrets의 Actions button을 click 해주세요. Screen Shot 2022-02-06 at 2 38 14
  3. New Repository Secret button을 이용해 Repository Secret을 등록합니다. repo
  4. 현재 Repository에서 REPO_OWNER는 noah0316이며,
    REPO_NAME은 notion-github-issue-sync입니다. Screen Shot 2022-02-06 at 2 41 21

STEP 5


이제 모든 설정이 끝났습니다!!

이제 Workflow 구성을 통해 Notion과 Github Issue가 연동되는 것을 확인하세요!!

notion-github-issue-sync's People

Contributors

noah0316 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

notion-github-issue-sync's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.