algers / stars-to-notion

Save stars in a Notion database automatically with GitHub Actions

Home Page:https://seanalger.notion.site/0dc0dd4d8c424a88ae6ed445380cd257?v=e514ae4f42ed45d48167c92863a77b57

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stars-to-notion

Add a users starred repositories to a Notion database using GitHub Actions.

Example

Usage

1. Fork or clone this repository

Fork a repository by following the guide here

2. Setup Notion

You can create your Notion API key here.

To create a Notion database that will work without modifying index.js, duplicate this empty database template.

You can follow the steps to create and provide access to an integration in the official documentation here

3. Setup environment

GH_USER_TOKEN=<your-github-personal-access-token>
NOTION_KEY=<your-notion-api-key>
NOTION_DATABASE_ID=<notion-database-id>
GH_STARS_USER=<github-user-to-fetch-stars>

You can create your GitHub Personal Access token by following the guide here.

Setup repository secrets for workflows by following the guide here

4. Modify workflow trigger and schedule

The workflow is triggered in one of two ways:

  • Push to master or main branches
  • Scheduled 4AM UTC daily

Edit the configuration by modfying .github/workflows/main.yml

on:
  push:
    branches:
      - master
      - main
  schedule:
    - cron: "0 4 * * *"

You can find cron schedule examples here

About

Save stars in a Notion database automatically with GitHub Actions

https://seanalger.notion.site/0dc0dd4d8c424a88ae6ed445380cd257?v=e514ae4f42ed45d48167c92863a77b57


Languages

Language:JavaScript 100.0%