NOISE知识效率集
#Notion
一个CloudFlare Worker / script / bot,用于将Concept页面公开同步为GitHub讨论。

#Notion 一个CloudFlare Worker / script / bot,用于将Concept页面公开同步为GitHub讨论。

notion image

notion-github-sync

This bot syncs public Notion pages as GitHub Discussions/Issues. It's done periodically, based on the pages shared with the Notion Integration, and based on metadata specific on your Notion page.

Usage

To use this tool, please make sure to have the following:
  1. Deploy this tool or run it locally with the relevant env vars.
  1. Make sure to add the user your wish to use as collaborator in your repos (this is needed only in order to delete Discussions)
  1. To make a Notion page public and syncable, first make sure to share this page with the Notion Integration you created:
notion image
  1. If you wish to make the Notion page public (with the Notion url), also tick Share to web:
notion image
  1. Annotate the top of your Notion page with the repo you wish to sync the page with the following text (NOT as code block, just as text - this should be the first block of your Notion page):
/github-public dotansimha/test-notion-sync discussion
You can also specify a custom GitHub Discussion category (the default is General):
/github-public dotansimha/test-notion-sync discussion General
Or, as an issue:
You can also specify a custom GitHub Discussion category (the default is General):
/github-public dotansimha/test-notion-sync issue
You can find a synced example page here: dotansimha/test-notion-sync#12
To remove a public discussion:
  1. Make sure to delete the annotation from your page.
  1. Wait for the next sync (or, manually run it)
  1. You can also remove now the integration access from the page.

Deployment (as CloudFlare Worker)

  • Every change to main branch will run CI and deploy to prod.
  • Make sure to configure your NOTION_TOKEN and GH_BOT_TOKEN (PAT) as part of the env vars.
  • You can also deploy from local env by running: npm run deploy
badge