Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tryfabric/notion-github-action
A GitHub Action that syncs new GitHub issues to a Notion database 🤖
https://github.com/tryfabric/notion-github-action
actions fabric github github-actions issue-management issues notion notion-api notion-blocks
Last synced: about 1 month ago
JSON representation
A GitHub Action that syncs new GitHub issues to a Notion database 🤖
- Host: GitHub
- URL: https://github.com/tryfabric/notion-github-action
- Owner: tryfabric
- License: mit
- Created: 2021-05-14T01:01:44.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-08T18:40:55.000Z (over 1 year ago)
- Last Synced: 2024-11-09T12:16:38.460Z (about 1 month ago)
- Topics: actions, fabric, github, github-actions, issue-management, issues, notion, notion-api, notion-blocks
- Language: TypeScript
- Homepage:
- Size: 2.56 MB
- Stars: 85
- Watchers: 3
- Forks: 23
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Notion x GitHub Action
[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts)
Connect your GitHub issues to a Notion database.
**Like this GitHub Action?** Give us a ⭐️ and [follow us on Twitter for more drops 🪂](https://twitter.com/tryfabric).
---
## Quick Start
1. [Create a new internal Notion integration](https://www.notion.so/my-integrations) and note the value of the Internal Integration Token.
2. In your GitHub repository, go to `Settings` > `Secrets`, and add a `New repository secret`. Set the `Name` to `NOTION_TOKEN` and the `Value` to the Internal Integration Token you created in the previous step.
3. Set up your Notion Database. Use [this template](https://www.notion.so/tryfabric/067329ee12044ec49b7db6b39b26920a?v=38dd7e968874436c810a5e604d2cf12c) and duplicate it to your workspace.
4. In your Notion Database page's `Share` menu, add the Notion integration you created as a member with the `Can edit` privilege. You may have to type your integration's name in the `Invite` field.
5. Find the ID of your Database by copying the link to it. The link will have the format```
https://www.notion.so/abc?v=123
```where `abc` is the database id.
6. Add the Database's ID as a repository secret for your GitHub repository. Set the `Name` to `NOTION_DATABASE` and the `Value` to the id of your Database.
7. In your GitHub repository, create a GitHub workflow file at the path `.github/workflows/issues-notion-sync.yml`.
```yaml
name: Notion Syncon:
workflow_dispatch:
issues:
types:
[
opened,
edited,
labeled,
unlabeled,
assigned,
unassigned,
milestoned,
demilestoned,
reopened,
closed,
]jobs:
notion_job:
runs-on: ubuntu-latest
name: Add GitHub Issues to Notion
steps:
- name: Add GitHub Issues to Notion
uses: tryfabric/notion-github-action@v1
with:
notion-token: ${{ secrets.NOTION_TOKEN }}
notion-db: ${{ secrets.NOTION_DATABASE }}
```8. (Optional) If your Github repository has any preexisting issues that you would like to sync to your new Notion Database you can trigger a manual workflow. Make sure your organization's default `GITHUB_TOKEN` has [read and write permissions](https://docs.github.com/en/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization) then follow [these intructions](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow) to run the `Notion Job` workflow.
_Note: The manual workflow will only work on Notion Databases created from the templated linked above._
## Using `release-it`
1. Locally, on `master` (make sure it's up to date), execute `GITHUB_TOKEN= release-it`. (Alternatively, set `GITHUB_TOKEN` as a system environment variable)
2. Follow the interactive prompts, selecting `Yes` for all options.
3. When selecting the increment, choose `patch` when the release is only bug fixes. For new features, choose `minor`. For major changes, choose `major`.Release-It will then automatically generate a GitHub release with the changelog inside.
---
Built with 💙 by the team behind [Fabric](https://tryfabric.com).