[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M793HEBF9ZCG2S511JDSZGMT":3,"skill-same:01M793HEBF9ZCG2S511JDSZGMT":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M793HEBF9ZCG2S511JDSZGMT","notion-ci-integration",null,"Integrate the Notion API into CI\u002FCD pipelines for automated documentation sync,\ndeploy tracking, and configuration reads. Use when setting up GitHub Actions\nworkflows that push release notes to Notion, update database entries on deploy,\ncreate incident pages from CI, or read feature flags from Notion databases.\nTrigger with phrases like \"notion CI\", \"notion GitHub Actions\", \"notion deploy sync\",\n\"notion release notes automation\", \"notion CI pipeline\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--notion-pack--notion-ci-integration\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: notion-ci-integration\ndescription: |\n  Integrate the Notion API into CI\u002FCD pipelines for automated documentation sync,\n  deploy tracking, and configuration reads. Use when setting up GitHub Actions\n  workflows that push release notes to Notion, update database entries on deploy,\n  create incident pages from CI, or read feature flags from Notion databases.\n  Trigger with phrases like \"notion CI\", \"notion GitHub Actions\", \"notion deploy sync\",\n  \"notion release notes automation\", \"notion CI pipeline\".\nallowed-tools: Read, Write, Edit, Bash(gh:*), Bash(npm:*), Bash(npx:*), Bash(python3:*)\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, productivity, notion, ci-cd, devops]\ncompatible-with: claude-code\n---\n\n# Notion CI Integration\n\n## Overview\n\nAutomate documentation sync, deploy tracking, and configuration management by integrating the Notion API into CI\u002FCD pipelines. This skill covers GitHub Actions workflows that push changelogs and release notes to Notion pages, update database entries on successful deploys, create pages for incident reports, and read feature flags or configuration from Notion databases — all with proper rate limit handling for CI environments.\n\n## Prerequisites\n\n- GitHub repository with Actions enabled\n- Notion internal integration token (create at `https:\u002F\u002Fwww.notion.so\u002Fmy-integrations`)\n- Target Notion pages\u002Fdatabases shared with the integration (click \"...\" > \"Connections\" > add your integration)\n- `NOTION_TOKEN` stored as a GitHub Actions secret\n- Node.js 18+ or Python 3.9+ in CI environment\n\n## Instructions\n\n### Step 1: GitHub Actions Workflow for Documentation Sync\n\nPush changelogs and release notes to Notion automatically on release.\n\n```yaml\n# .github\u002Fworkflows\u002Fnotion-docs-sync.yml\nname: Sync Docs to Notion\n\non:\n  release:\n    types: [published]\n  push:\n    branches: [main]\n    paths: ['CHANGELOG.md', 'docs\u002F**']\n\nenv:\n  NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}\n\njobs:\n  sync-release-notes:\n    runs-on: ubuntu-latest\n    if: github.event_name == 'release'\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: '20'\n          cache: 'npm'\n      - run: npm ci\n\n      - name: Push release notes to Notion\n        run: node scripts\u002Fnotion-release-sync.js\n        env:\n          NOTION_RELEASES_DB: ${{ secrets.NOTION_RELEASES_DB }}\n          RELEASE_TAG: ${{ github.event.release.tag_name }}\n          RELEASE_BODY: ${{ github.event.release.body }}\n          RELEASE_URL: ${{ github.event.release.html_url }}\n\n  sync-changelog:\n    runs-on: ubuntu-latest\n    if: github.event_name == 'push'\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: '20'\n          cache: 'npm'\n      - run: npm ci\n\n      - name: Sync CHANGELOG to Notion page\n        run: node scripts\u002Fnotion-changelog-sync.js\n        env:\n          NOTION_CHANGELOG_PAGE: ${{ secrets.NOTION_CHANGELOG_PAGE }}\n\n  update-deploy-status:\n    runs-on: ubuntu-latest\n    needs: sync-release-notes\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: '20'\n          cache: 'npm'\n      - run: npm ci\n\n      - name: Update deploy tracker in Notion\n        run: node scripts\u002Fnotion-deploy-update.js\n        env:\n          NOTION_DEPLOYS_DB: ${{ secrets.NOTION_DEPLOYS_DB }}\n          DEPLOY_VERSION: ${{ github.event.release.tag_name }}\n          DEPLOY_ENV: production\n          DEPLOY_SHA: ${{ github.sha }}\n```\n\n### Step 2: CI Scripts for Notion Operations\n\n#### Release Notes Sync (Node.js)\n\n```typescript\n\u002F\u002F scripts\u002Fnotion-release-sync.js\nimport { Client } from '@notionhq\u002Fclient';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN });\nconst databaseId = process.env.NOTION_RELEASES_DB;\n\nasync function syncReleaseNotes() {\n  const tag = process.env.RELEASE_TAG;\n  const body = process.env.RELEASE_BODY || 'No release notes provided.';\n  const url = process.env.RELEASE_URL;\n\n  \u002F\u002F Create a new page in the releases database\n  const page = await notion.pages.create({\n    parent: { database_id: databaseId },\n    properties: {\n      Name: {\n        title: [{ text: { content: `Release ${tag}` } }],\n      },\n      Version: {\n        rich_text: [{ text: { content: tag } }],\n      },\n      Status: {\n        select: { name: 'Released' },\n      },\n      'Release Date': {\n        date: { start: new Date().toISOString().split('T')[0] },\n      },\n      'GitHub URL': {\n        url: url,\n      },\n    },\n  });\n\n  \u002F\u002F Append the release body as page content\n  const blocks = body.split('\\n').filter(Boolean).map((line) => ({\n    paragraph: {\n      rich_text: [{ text: { content: line } }],\n    },\n  }));\n\n  \u002F\u002F Notion API limits to 100 blocks per request\n  for (let i = 0; i \u003C blocks.length; i += 100) {\n    await notion.blocks.children.append({\n      block_id: page.id,\n      children: blocks.slice(i, i + 100),\n    });\n    \u002F\u002F Rate limit: wait between batch appends\n    if (i + 100 \u003C blocks.length) await sleep(350);\n  }\n\n  console.log(`Created release page: ${page.id}`);\n}\n\nfunction sleep(ms) {\n  return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nsyncReleaseNotes().catch((err) => {\n  console.error('Failed to sync release notes:', err.message);\n  process.exit(1);\n});\n```\n\n#### Deploy Status Update (Node.js)\n\n```typescript\n\u002F\u002F scripts\u002Fnotion-deploy-update.js\nimport { Client } from '@notionhq\u002Fclient';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN });\nconst databaseId = process.env.NOTION_DEPLOYS_DB;\n\nasync function updateDeployStatus() {\n  const version = process.env.DEPLOY_VERSION;\n  const environment = process.env.DEPLOY_ENV || 'staging';\n  const sha = process.env.DEPLOY_SHA;\n\n  \u002F\u002F Search for existing entry by version\n  const existing = await notion.databases.query({\n    database_id: databaseId,\n    filter: {\n      property: 'Version',\n      rich_text: { equals: version },\n    },\n  });\n\n  if (existing.results.length > 0) {\n    \u002F\u002F Update existing entry\n    await notion.pages.update({\n      page_id: existing.results[0].id,\n      properties: {\n        Status: { select: { name: 'Deployed' } },\n        Environment: { select: { name: environment } },\n        'Deploy Time': {\n          date: { start: new Date().toISOString() },\n        },\n        'Commit SHA': {\n          rich_text: [{ text: { content: sha.substring(0, 7) } }],\n        },\n      },\n    });\n    console.log(`Updated deploy entry for ${version}`);\n  } else {\n    \u002F\u002F Create new deploy entry\n    await notion.pages.create({\n      parent: { database_id: databaseId },\n      properties: {\n        Name: {\n          title: [{ text: { content: `Deploy ${version}` } }],\n        },\n        Version: {\n          rich_text: [{ text: { content: version } }],\n        },\n        Status: { select: { name: 'Deployed' } },\n        Environment: { select: { name: environment } },\n        'Deploy Time': {\n          date: { start: new Date().toISOString() },\n        },\n        'Commit SHA': {\n          rich_text: [{ text: { content: sha.substring(0, 7) } }],\n        },\n      },\n    });\n    console.log(`Created deploy entry for ${version}`);\n  }\n}\n\nupdateDeployStatus().catch((err) => {\n  console.error('Failed to update deploy status:', err.message);\n  process.exit(1);\n});\n```\n\n#### Python Batch Update Script for CI\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n# scripts\u002Fnotion_batch_update.py\n\"\"\"Batch update Notion database entries from CI.\n\nUsage:\n  python3 scripts\u002Fnotion_batch_update.py --database-id \u003Cid> \\\n    --filter-property Status --filter-value \"In Progress\" \\\n    --set-property Status --set-value \"Deployed\" \\\n    --set-property Version --set-value \"$TAG\"\n\"\"\"\nimport os\nimport sys\nimport time\nimport argparse\nfrom notion_client import Client, APIResponseError\n\nRATE_LIMIT_DELAY = 0.34  # 3 requests\u002Fsec max\n\ndef main():\n    parser = argparse.ArgumentParser(description='Batch update Notion DB entries')\n    parser.add_argument('--database-id', required=True)\n    parser.add_argument('--filter-property', required=True)\n    parser.add_argument('--filter-value', required=True)\n    parser.add_argument('--set-property', action='append', required=True)\n    parser.add_argument('--set-value', action='append', required=True)\n    parser.add_argument('--dry-run', action='store_true')\n    args = parser.parse_args()\n\n    token = os.environ.get('NOTION_TOKEN')\n    if not token:\n        print('ERROR: NOTION_TOKEN not set', file=sys.stderr)\n        sys.exit(1)\n\n    notion = Client(auth=token)\n\n    # Query with filter\n    results = []\n    cursor = None\n    while True:\n        response = notion.databases.query(\n            database_id=args.database_id,\n            filter={\n                'property': args.filter_property,\n                'select': {'equals': args.filter_value},\n            },\n            start_cursor=cursor,\n        )\n        results.extend(response['results'])\n        if not response['has_more']:\n            break\n        cursor = response['next_cursor']\n        time.sleep(RATE_LIMIT_DELAY)\n\n    print(f'Found {len(results)} entries matching {args.filter_property}={args.filter_value}')\n\n    if args.dry_run:\n        for page in results:\n            title = page['properties'].get('Name', {}).get('title', [{}])\n            name = title[0].get('plain_text', 'Untitled') if title else 'Untitled'\n            print(f'  Would update: {name} ({page[\"id\"]})')\n        return\n\n    # Build update properties\n    updates = {}\n    for prop, val in zip(args.set_property, args.set_value):\n        updates[prop] = {'select': {'name': val}}\n\n    # Apply updates sequentially (rate limit safe)\n    success = 0\n    for page in results:\n        try:\n            notion.pages.update(page_id=page['id'], properties=updates)\n            success += 1\n            time.sleep(RATE_LIMIT_DELAY)\n        except APIResponseError as e:\n            if e.code == 'rate_limited':\n                retry_after = float(e.headers.get('retry-after', 1))\n                print(f'Rate limited. Waiting {retry_after}s...')\n                time.sleep(retry_after)\n                notion.pages.update(page_id=page['id'], properties=updates)\n                success += 1\n            else:\n                print(f'Failed to update {page[\"id\"]}: {e.message}', file=sys.stderr)\n\n    print(f'Updated {success}\u002F{len(results)} entries')\n\nif __name__ == '__main__':\n    main()\n```\n\n### Step 3: Reading Configuration from Notion in CI\n\nUse Notion databases as a lightweight feature-flag or config store that non-engineers can edit.\n\n```typescript\n\u002F\u002F scripts\u002Fnotion-read-config.js\nimport { Client } from '@notionhq\u002Fclient';\nimport { writeFileSync } from 'fs';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN });\nconst configDbId = process.env.NOTION_CONFIG_DB;\n\nasync function readConfig() {\n  const response = await notion.databases.query({\n    database_id: configDbId,\n    filter: {\n      property: 'Environment',\n      select: { equals: process.env.DEPLOY_ENV || 'production' },\n    },\n  });\n\n  const config = {};\n  for (const page of response.results) {\n    if (page.object !== 'page' || !('properties' in page)) continue;\n    const props = page.properties;\n\n    const keyProp = props['Key'];\n    const valueProp = props['Value'];\n    if (keyProp?.type !== 'title' || valueProp?.type !== 'rich_text') continue;\n\n    const key = keyProp.title.map((t) => t.plain_text).join('');\n    const value = valueProp.rich_text.map((t) => t.plain_text).join('');\n\n    if (key) config[key] = value;\n  }\n\n  \u002F\u002F Write config to file for downstream CI steps\n  writeFileSync('notion-config.json', JSON.stringify(config, null, 2));\n  console.log(`Loaded ${Object.keys(config).length} config entries from Notion`);\n}\n\nreadConfig().catch((err) => {\n  console.error('Failed to read config:', err.message);\n  process.exit(1);\n});\n```\n\nGitHub Actions step to consume:\n\n```yaml\n- name: Load feature flags from Notion\n  run: node scripts\u002Fnotion-read-config.js\n  env:\n    NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}\n    NOTION_CONFIG_DB: ${{ secrets.NOTION_CONFIG_DB }}\n    DEPLOY_ENV: production\n\n- name: Use config in build\n  run: |\n    CONFIG=$(cat notion-config.json)\n    echo \"Feature flags loaded: $(echo $CONFIG | jq 'keys | length') entries\"\n```\n\n## Output\n\n- GitHub Actions workflow that syncs release notes to a Notion database on every release\n- Deploy tracker that updates database entries with status \"Deployed\", version tag, commit SHA, and timestamp\n- Python batch update script for bulk status changes in CI (with `--dry-run` safety)\n- Config reader that pulls feature flags from Notion databases into CI environment\n- All scripts handle rate limits (sequential operations, 350ms delays between requests)\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| `401 Unauthorized` | Invalid or expired `NOTION_TOKEN` | Regenerate token at notion.so\u002Fmy-integrations, update `gh secret set NOTION_TOKEN` |\n| `404 Object not found` | Database\u002Fpage not shared with integration | Open page in Notion > \"...\" > \"Connections\" > add integration |\n| `429 Rate limited` | Exceeded 3 requests\u002Fsecond | Add `time.sleep(0.34)` between sequential calls; use `retry-after` header |\n| `400 Validation error` | Property name mismatch or wrong type | Verify property names exactly match database schema (case-sensitive) |\n| `Secret not found` in CI | `NOTION_TOKEN` not configured | Run `gh secret set NOTION_TOKEN` and paste the integration token |\n| Timeout in CI | Large batch operations | Set `timeout-minutes: 10` on the job; process in chunks of 100 |\n| `ECONNRESET` in CI | Transient network failure | SDK has built-in retry (2 retries with exponential backoff by default) |\n\n## Examples\n\n### Incident Report Creator (GitHub Actions)\n\nCreate structured incident pages from CI using `workflow_dispatch`. Dispatched manually or via `gh workflow run` with severity, title, and description inputs. Creates a Notion page with Description, Timeline, and Resolution sections.\n\nSee [incident-workflow.md](references\u002Fincident-workflow.md) for the complete workflow YAML and database schema.\n\nQuick trigger:\n\n```bash\ngh workflow run notion-incident.yml \\\n  -f severity=P1 \\\n  -f title=\"Database connection pool exhausted\" \\\n  -f description=\"Production DB hit max connections at 14:32 UTC\"\n```\n\n### Changelog Page Updater\n\nParse `CHANGELOG.md` and replace a Notion page's content with structured blocks (headings, bullet lists, paragraphs). Clears existing content first, then appends in 100-block chunks with rate-limit delays.\n\nSee [changelog-sync.md](references\u002Fchangelog-sync.md) for the complete Node.js script and GitHub Actions step.\n\n## Resources\n\n- [Notion API Reference](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fintro)\n- [@notionhq\u002Fclient on npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@notionhq\u002Fclient)\n- [notion-client on PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002Fnotion-client\u002F)\n- [GitHub Actions Encrypted Secrets](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fsecurity-guides\u002Fencrypted-secrets)\n- [Notion Request Limits (3 req\u002Fsec)](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Frequest-limits)\n- [GitHub Actions Workflow Syntax](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fusing-workflows\u002Fworkflow-syntax-for-github-actions)\n\n## Next Steps\n\nFor deployment patterns and environment-specific Notion sync, see `notion-deploy-integration`. For rate limit handling strategies at scale, see `notion-rate-limits`.\n","# Notion CI Integration\n\n## Overview\n\nAutomate documentation sync, deploy tracking, and configuration management by integrating the Notion API into CI\u002FCD pipelines. This skill covers GitHub Actions workflows that push changelogs and release notes to Notion pages, update database entries on successful deploys, create pages for incident reports, and read feature flags or configuration from Notion databases — all with proper rate limit handling for CI environments.\n\n## Prerequisites\n\n- GitHub repository with Actions enabled\n- Notion internal integration token (create at `https:\u002F\u002Fwww.notion.so\u002Fmy-integrations`)\n- Target Notion pages\u002Fdatabases shared with the integration (click \"...\" > \"Connections\" > add your integration)\n- `NOTION_TOKEN` stored as a GitHub Actions secret\n- Node.js 18+ or Python 3.9+ in CI environment\n\n## Instructions\n\n### Step 1: GitHub Actions Workflow for Documentation Sync\n\nPush changelogs and release notes to Notion automatically on release.\n\n```yaml\n# .github\u002Fworkflows\u002Fnotion-docs-sync.yml\nname: Sync Docs to Notion\n\non:\n  release:\n    types: [published]\n  push:\n    branches: [main]\n    paths: ['CHANGELOG.md', 'docs\u002F**']\n\nenv:\n  NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}\n\njobs:\n  sync-release-notes:\n    runs-on: ubuntu-latest\n    if: github.event_name == 'release'\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: '20'\n          cache: 'npm'\n      - run: npm ci\n\n      - name: Push release notes to Notion\n        run: node scripts\u002Fnotion-release-sync.js\n        env:\n          NOTION_RELEASES_DB: ${{ secrets.NOTION_RELEASES_DB }}\n          RELEASE_TAG: ${{ github.event.release.tag_name }}\n          RELEASE_BODY: ${{ github.event.release.body }}\n          RELEASE_URL: ${{ github.event.release.html_url }}\n\n  sync-changelog:\n    runs-on: ubuntu-latest\n    if: github.event_name == 'push'\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: '20'\n          cache: 'npm'\n      - run: npm ci\n\n      - name: Sync CHANGELOG to Notion page\n        run: node scripts\u002Fnotion-changelog-sync.js\n        env:\n          NOTION_CHANGELOG_PAGE: ${{ secrets.NOTION_CHANGELOG_PAGE }}\n\n  update-deploy-status:\n    runs-on: ubuntu-latest\n    needs: sync-release-notes\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: actions\u002Fsetup-node@v4\n        with:\n          node-version: '20'\n          cache: 'npm'\n      - run: npm ci\n\n      - name: Update deploy tracker in Notion\n        run: node scripts\u002Fnotion-deploy-update.js\n        env:\n          NOTION_DEPLOYS_DB: ${{ secrets.NOTION_DEPLOYS_DB }}\n          DEPLOY_VERSION: ${{ github.event.release.tag_name }}\n          DEPLOY_ENV: production\n          DEPLOY_SHA: ${{ github.sha }}\n```\n\n### Step 2: CI Scripts for Notion Operations\n\n#### Release Notes Sync (Node.js)\n\n```typescript\n\u002F\u002F scripts\u002Fnotion-release-sync.js\nimport { Client } from '@notionhq\u002Fclient';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN });\nconst databaseId = process.env.NOTION_RELEASES_DB;\n\nasync function syncReleaseNotes() {\n  const tag = process.env.RELEASE_TAG;\n  const body = process.env.RELEASE_BODY || 'No release notes provided.';\n  const url = process.env.RELEASE_URL;\n\n  \u002F\u002F Create a new page in the releases database\n  const page = await notion.pages.create({\n    parent: { database_id: databaseId },\n    properties: {\n      Name: {\n        title: [{ text: { content: `Release ${tag}` } }],\n      },\n      Version: {\n        rich_text: [{ text: { content: tag } }],\n      },\n      Status: {\n        select: { name: 'Released' },\n      },\n      'Release Date': {\n        date: { start: new Date().toISOString().split('T')[0] },\n      },\n      'GitHub URL': {\n        url: url,\n      },\n    },\n  });\n\n  \u002F\u002F Append the release body as page content\n  const blocks = body.split('\\n').filter(Boolean).map((line) => ({\n    paragraph: {\n      rich_text: [{ text: { content: line } }],\n    },\n  }));\n\n  \u002F\u002F Notion API limits to 100 blocks per request\n  for (let i = 0; i \u003C blocks.length; i += 100) {\n    await notion.blocks.children.append({\n      block_id: page.id,\n      children: blocks.slice(i, i + 100),\n    });\n    \u002F\u002F Rate limit: wait between batch appends\n    if (i + 100 \u003C blocks.length) await sleep(350);\n  }\n\n  console.log(`Created release page: ${page.id}`);\n}\n\nfunction sleep(ms) {\n  return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nsyncReleaseNotes().catch((err) => {\n  console.error('Failed to sync release notes:', err.message);\n  process.exit(1);\n});\n```\n\n#### Deploy Status Update (Node.js)\n\n```typescript\n\u002F\u002F scripts\u002Fnotion-deploy-update.js\nimport { Client } from '@notionhq\u002Fclient';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN });\nconst databaseId = process.env.NOTION_DEPLOYS_DB;\n\nasync function updateDeployStatus() {\n  const version = process.env.DEPLOY_VERSION;\n  const environment = process.env.DEPLOY_ENV || 'staging';\n  const sha = process.env.DEPLOY_SHA;\n\n  \u002F\u002F Search for existing entry by version\n  const existing = await notion.databases.query({\n    database_id: databaseId,\n    filter: {\n      property: 'Version',\n      rich_text: { equals: version },\n    },\n  });\n\n  if (existing.results.length > 0) {\n    \u002F\u002F Update existing entry\n    await notion.pages.update({\n      page_id: existing.results[0].id,\n      properties: {\n        Status: { select: { name: 'Deployed' } },\n        Environment: { select: { name: environment } },\n        'Deploy Time': {\n          date: { start: new Date().toISOString() },\n        },\n        'Commit SHA': {\n          rich_text: [{ text: { content: sha.substring(0, 7) } }],\n        },\n      },\n    });\n    console.log(`Updated deploy entry for ${version}`);\n  } else {\n    \u002F\u002F Create new deploy entry\n    await notion.pages.create({\n      parent: { database_id: databaseId },\n      properties: {\n        Name: {\n          title: [{ text: { content: `Deploy ${version}` } }],\n        },\n        Version: {\n          rich_text: [{ text: { content: version } }],\n        },\n        Status: { select: { name: 'Deployed' } },\n        Environment: { select: { name: environment } },\n        'Deploy Time': {\n          date: { start: new Date().toISOString() },\n        },\n        'Commit SHA': {\n          rich_text: [{ text: { content: sha.substring(0, 7) } }],\n        },\n      },\n    });\n    console.log(`Created deploy entry for ${version}`);\n  }\n}\n\nupdateDeployStatus().catch((err) => {\n  console.error('Failed to update deploy status:', err.message);\n  process.exit(1);\n});\n```\n\n#### Python Batch Update Script for CI\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n# scripts\u002Fnotion_batch_update.py\n\"\"\"Batch update Notion database entries from CI.\n\nUsage:\n  python3 scripts\u002Fnotion_batch_update.py --database-id \u003Cid> \\\n    --filter-property Status --filter-value \"In Progress\" \\\n    --set-property Status --set-value \"Deployed\" \\\n    --set-property Version --set-value \"$TAG\"\n\"\"\"\nimport os\nimport sys\nimport time\nimport argparse\nfrom notion_client import Client, APIResponseError\n\nRATE_LIMIT_DELAY = 0.34  # 3 requests\u002Fsec max\n\ndef main():\n    parser = argparse.ArgumentParser(description='Batch update Notion DB entries')\n    parser.add_argument('--database-id', required=True)\n    parser.add_argument('--filter-property', required=True)\n    parser.add_argument('--filter-value', required=True)\n    parser.add_argument('--set-property', action='append', required=True)\n    parser.add_argument('--set-value', action='append', required=True)\n    parser.add_argument('--dry-run', action='store_true')\n    args = parser.parse_args()\n\n    token = os.environ.get('NOTION_TOKEN')\n    if not token:\n        print('ERROR: NOTION_TOKEN not set', file=sys.stderr)\n        sys.exit(1)\n\n    notion = Client(auth=token)\n\n    # Query with filter\n    results = []\n    cursor = None\n    while True:\n        response = notion.databases.query(\n            database_id=args.database_id,\n            filter={\n                'property': args.filter_property,\n                'select': {'equals': args.filter_value},\n            },\n            start_cursor=cursor,\n        )\n        results.extend(response['results'])\n        if not response['has_more']:\n            break\n        cursor = response['next_cursor']\n        time.sleep(RATE_LIMIT_DELAY)\n\n    print(f'Found {len(results)} entries matching {args.filter_property}={args.filter_value}')\n\n    if args.dry_run:\n        for page in results:\n            title = page['properties'].get('Name', {}).get('title', [{}])\n            name = title[0].get('plain_text', 'Untitled') if title else 'Untitled'\n            print(f'  Would update: {name} ({page[\"id\"]})')\n        return\n\n    # Build update properties\n    updates = {}\n    for prop, val in zip(args.set_property, args.set_value):\n        updates[prop] = {'select': {'name': val}}\n\n    # Apply updates sequentially (rate limit safe)\n    success = 0\n    for page in results:\n        try:\n            notion.pages.update(page_id=page['id'], properties=updates)\n            success += 1\n            time.sleep(RATE_LIMIT_DELAY)\n        except APIResponseError as e:\n            if e.code == 'rate_limited':\n                retry_after = float(e.headers.get('retry-after', 1))\n                print(f'Rate limited. Waiting {retry_after}s...')\n                time.sleep(retry_after)\n                notion.pages.update(page_id=page['id'], properties=updates)\n                success += 1\n            else:\n                print(f'Failed to update {page[\"id\"]}: {e.message}', file=sys.stderr)\n\n    print(f'Updated {success}\u002F{len(results)} entries')\n\nif __name__ == '__main__':\n    main()\n```\n\n### Step 3: Reading Configuration from Notion in CI\n\nUse Notion databases as a lightweight feature-flag or config store that non-engineers can edit.\n\n```typescript\n\u002F\u002F scripts\u002Fnotion-read-config.js\nimport { Client } from '@notionhq\u002Fclient';\nimport { writeFileSync } from 'fs';\n\nconst notion = new Client({ auth: process.env.NOTION_TOKEN });\nconst configDbId = process.env.NOTION_CONFIG_DB;\n\nasync function readConfig() {\n  const response = await notion.databases.query({\n    database_id: configDbId,\n    filter: {\n      property: 'Environment',\n      select: { equals: process.env.DEPLOY_ENV || 'production' },\n    },\n  });\n\n  const config = {};\n  for (const page of response.results) {\n    if (page.object !== 'page' || !('properties' in page)) continue;\n    const props = page.properties;\n\n    const keyProp = props['Key'];\n    const valueProp = props['Value'];\n    if (keyProp?.type !== 'title' || valueProp?.type !== 'rich_text') continue;\n\n    const key = keyProp.title.map((t) => t.plain_text).join('');\n    const value = valueProp.rich_text.map((t) => t.plain_text).join('');\n\n    if (key) config[key] = value;\n  }\n\n  \u002F\u002F Write config to file for downstream CI steps\n  writeFileSync('notion-config.json', JSON.stringify(config, null, 2));\n  console.log(`Loaded ${Object.keys(config).length} config entries from Notion`);\n}\n\nreadConfig().catch((err) => {\n  console.error('Failed to read config:', err.message);\n  process.exit(1);\n});\n```\n\nGitHub Actions step to consume:\n\n```yaml\n- name: Load feature flags from Notion\n  run: node scripts\u002Fnotion-read-config.js\n  env:\n    NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}\n    NOTION_CONFIG_DB: ${{ secrets.NOTION_CONFIG_DB }}\n    DEPLOY_ENV: production\n\n- name: Use config in build\n  run: |\n    CONFIG=$(cat notion-config.json)\n    echo \"Feature flags loaded: $(echo $CONFIG | jq 'keys | length') entries\"\n```\n\n## Output\n\n- GitHub Actions workflow that syncs release notes to a Notion database on every release\n- Deploy tracker that updates database entries with status \"Deployed\", version tag, commit SHA, and timestamp\n- Python batch update script for bulk status changes in CI (with `--dry-run` safety)\n- Config reader that pulls feature flags from Notion databases into CI environment\n- All scripts handle rate limits (sequential operations, 350ms delays between requests)\n\n## Error Handling\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| `401 Unauthorized` | Invalid or expired `NOTION_TOKEN` | Regenerate token at notion.so\u002Fmy-integrations, update `gh secret set NOTION_TOKEN` |\n| `404 Object not found` | Database\u002Fpage not shared with integration | Open page in Notion > \"...\" > \"Connections\" > add integration |\n| `429 Rate limited` | Exceeded 3 requests\u002Fsecond | Add `time.sleep(0.34)` between sequential calls; use `retry-after` header |\n| `400 Validation error` | Property name mismatch or wrong type | Verify property names exactly match database schema (case-sensitive) |\n| `Secret not found` in CI | `NOTION_TOKEN` not configured | Run `gh secret set NOTION_TOKEN` and paste the integration token |\n| Timeout in CI | Large batch operations | Set `timeout-minutes: 10` on the job; process in chunks of 100 |\n| `ECONNRESET` in CI | Transient network failure | SDK has built-in retry (2 retries with exponential backoff by default) |\n\n## Examples\n\n### Incident Report Creator (GitHub Actions)\n\nCreate structured incident pages from CI using `workflow_dispatch`. Dispatched manually or via `gh workflow run` with severity, title, and description inputs. Creates a Notion page with Description, Timeline, and Resolution sections.\n\nSee [incident-workflow.md](references\u002Fincident-workflow.md) for the complete workflow YAML and database schema.\n\nQuick trigger:\n\n```bash\ngh workflow run notion-incident.yml \\\n  -f severity=P1 \\\n  -f title=\"Database connection pool exhausted\" \\\n  -f description=\"Production DB hit max connections at 14:32 UTC\"\n```\n\n### Changelog Page Updater\n\nParse `CHANGELOG.md` and replace a Notion page's content with structured blocks (headings, bullet lists, paragraphs). Clears existing content first, then appends in 100-block chunks with rate-limit delays.\n\nSee [changelog-sync.md](references\u002Fchangelog-sync.md) for the complete Node.js script and GitHub Actions step.\n\n## Resources\n\n- [Notion API Reference](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Fintro)\n- [@notionhq\u002Fclient on npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@notionhq\u002Fclient)\n- [notion-client on PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002Fnotion-client\u002F)\n- [GitHub Actions Encrypted Secrets](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fsecurity-guides\u002Fencrypted-secrets)\n- [Notion Request Limits (3 req\u002Fsec)](https:\u002F\u002Fdevelopers.notion.com\u002Freference\u002Frequest-limits)\n- [GitHub Actions Workflow Syntax](https:\u002F\u002Fdocs.github.com\u002Fen\u002Factions\u002Fusing-workflows\u002Fworkflow-syntax-for-github-actions)\n\n## Next Steps\n\nFor deployment patterns and environment-specific Notion sync, see `notion-deploy-integration`. For rate limit handling strategies at scale, see `notion-rate-limits`.\n",{"name":5,"tags":24,"author":30,"license":15,"version":31,"description":32,"allowed-tools":33,"compatible-with":34},[25,26,27,28,29],"saas","productivity","notion","ci-cd","devops","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Integrate the Notion API into CI\u002FCD pipelines for automated documentation sync,\ndeploy tracking, and configuration reads. Use when setting up GitHub Actions\nworkflows that push release notes to Notion, update database entries on deploy,\ncreate incident pages from CI, or read feature flags from Notion databases.\nTrigger with phrases like \"notion CI\", \"notion GitHub Actions\", \"notion deploy sync\",\n\"notion release notes automation\", \"notion CI pipeline\".\n","Read, Write, Edit, Bash(gh:*), Bash(npm:*), Bash(npx:*), Bash(python3:*)","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--notion-pack--notion-ci-integration",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill notion-ci-integration",{"tool":50,"command":51},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill notion-ci-integration",{"tool":53,"command":54},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill notion-ci-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--notion-pack--notion-ci-integration\u002FSKILL.md",true,[],[59,66,73,80,87,95],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]