stars-to-notion
Add a users starred repositories to a Notion database using GitHub Actions.
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
ormain
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