Skip to main content

cro-owner-sync

Propagate Owner changes from the Page Registry to the Roadmap & Backlog. Triggered by Notion automation when the Owner field changes on a Page Registry entry.

来源信息

仓库
warpdotdev/cro-agent-oss
最近来源活动
2026年7月7日 21:57
检测到的 SKILL.md 语言
英语
星标
3
分支
2

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
cro-owner-sync
description
Propagate Owner changes from the Page Registry to the Roadmap & Backlog. Triggered by Notion automation when the Owner field changes on a Page Registry entry.
# Owner Sync ## Configuration Read `.warp/skills/cro/references/config.md` for Notion IDs. ## Input Notion automation passes the Page Registry entry that was changed: ``` NOTION_PAGE_ID: <page-registry-entry-id> PAGE_PATH: /example-page OWNER: Emilie ``` ## Procedure ### Step 1: Read the updated Owner from the Page Registry Fetch the Page Registry entry using `NOTION_PAGE_ID`: ```bash curl -s "https://api.notion.com/v1/pages/{{NOTION_PAGE_ID}}" \ -H "Authorization: Bearer $NOTION_INTEGRATION_TOKEN" \ -H "Notion-Version: 2022-06-28" ``` Extract: - `Page Path` (title field) - `Owner` (select field — may be null if Owner was cleared) ### Step 2: Find all Roadmap entries for this page Query the Roadmap & Backlog for all non-archived entries matching this page: ```bash curl -s -X POST "https://api.notion.com/v1/databases/NOTION_ROADMAP_DB_ID/query" \ -H "Authorization: Bearer $NOTION_INTEGRATION_TOKEN" \ -H "Notion-Version: 2022-06-28" \ -H "Content-Type: application/json" \ -d '{"filter": {"and": [ {"property": "Page", "select": {"equals": "{{PAGE_PATH}}"}}, {"property": "Status", "select": {"does_not_equal": "0-archived"}} ]}}' ``` ### Step 3: Update Owner on each entry For each Roadmap entry, set `Owner` to match the Page Registry value: **If Owner is set:** ```bash curl -s -X PATCH "https://api.notion.com/v1/pages/{{ROADMAP_ENTRY_ID}}" \ -H "Authorization: Bearer $NOTION_INTEGRATION_TOKEN" \ -H "Notion-Version: 2022-06-28" \ -H "Content-Type: application/json" \ -d '{"properties": {"Owner": {"select": {"name": "{{OWNER_NAME}}"}}}}' ``` **If Owner was cleared (null):** ```bash curl -s -X PATCH "https://api.notion.com/v1/pages/{{ROADMAP_ENTRY_ID}}" \ -H "Authorization: Bearer $NOTION_INTEGRATION_TOKEN" \ -H "Notion-Version: 2022-06-28" \ -H "Content-Type: application/json" \ -d '{"properties": {"Owner": {"select": null}}}' ``` Rate-limit updates to avoid Notion API throttling (~3 requests/second). Print the count of updated entries to the agent session output. ## Important Notes - This skill silently keeps Notion databases aligned. - **Do NOT touch any field other than Owner.** This is a single-purpose sync. - Only update non-archived entries. Archived experiments are historical records and should keep whatever Owner they had when archived. - If the Roadmap entry already has the correct Owner, skip the update to avoid unnecessary writes.
在 GitHub 查看