Skip to content

Notion PR status sync action (TS rewrite)#68

Closed
vatsalpatel wants to merge 4 commits into
mainfrom
notion-status-action
Closed

Notion PR status sync action (TS rewrite)#68
vatsalpatel wants to merge 4 commits into
mainfrom
notion-status-action

Conversation

@vatsalpatel

Copy link
Copy Markdown
Contributor

Rewrites the action to sync Notion Status from PR lifecycle events (replacing the old title-prefix + Make-webhook behaviors tied to the native integration that's being removed).

What it does

  • On PR events, updates the PR's row in the Notion Pull Requests DB (Draft / Open / Merged / Closed) and the linked issue's Status (opened→In PR, changes_requested→Fixes Required, merged→For QA — only when the last linked PR merges).
  • Resolves the issue by PR URL → Pull Requests DB relation, with an [ISSUE-N]-in-body fallback. No title marker needed (conventional-commit safe).
  • Non-fatal (never reds a check) + idempotent. using: node20, ncc-bundled dist/.

Also included

  • status/ — standalone Python composite action (feature parity, separate).
  • Part 1 groundwork: open-pr skill + link_pr.py; OpenSpec change link-pr-to-notion.

⚠️ How to test — do NOT merge to main to test

~20 repos pin notion-issue-sync@main, so merging flips the whole fleet at once. Test this from the branch ref first in a single repo:

on:
  pull_request: { types: [opened, reopened, ready_for_review, closed] }
  pull_request_review: { types: [submitted] }
jobs:
  notion:
    runs-on: ubuntu-latest
    steps:
      - uses: MathGaps/notion-issue-sync@notion-status-action
        with:
          notion_token: ${{ secrets.NOTION_TOKEN }}

Only merge to main once you're happy and ready to roll it out everywhere.

Known: CI may be red

check-dist / build-test still pin node16 and lint the removed inputs — cosmetic, doesn't affect the action (it runs from the committed dist/). Follow-up: bump those workflows to node20.

🤖 Generated with Claude Code

@vatsalpatel
vatsalpatel marked this pull request as draft July 3, 2026 04:54
@vatsalpatel vatsalpatel closed this Jul 3, 2026
@vatsalpatel
vatsalpatel deleted the notion-status-action branch July 3, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant