Open History to see the last commit
1# notify-intent.yml β Drop this into your library repo's .github/workflows/
2#
3# Fires a repository_dispatch event to TanStack/intent whenever docs or
4# source files change on merge to main. This triggers the skill staleness
5# check workflow in the intent repo.
6#
7# Requirements:
8# - A fine-grained PAT with contents:write on TanStack/intent stored
9# as the INTENT_NOTIFY_TOKEN repository secret.
10#
11# Template variables (replaced by `intent setup`):
12# @tanstack/devtools
13# docs/**
14# packages/*/src/**
15β
16name: Notify Intent
17β
18on:
19 push:
20 branches: [main]
21 paths:
22 - 'docs/**'
23 - 'packages/*/src/**'
24β
25permissions:
26 contents: read
27β
28jobs:
29 notify:
30 name: Notify TanStack Intent
31 runs-on: ubuntu-latest
32 steps:
33 - name: Checkout
34 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
35 with:
36 fetch-depth: 2
37 persist-credentials: false
38β
39 - name: Collect changed files
40 id: changes
41 run: |
42 FILES=$(git diff --name-only HEAD~1 HEAD | jq -R -s -c 'split("\n") | map(select(length > 0))')
43 echo "files=$FILES" >> "$GITHUB_OUTPUT"
44β
45 - name: Dispatch to intent repo
46 uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
47 with:
48 token: ${{ secrets.INTENT_NOTIFY_TOKEN }}
49 repository: TanStack/intent
50 event-type: skill-check
51 client-payload: |
52 {
53 "package": "@tanstack/devtools",
54 "sha": "${{ github.sha }}",
55 "changed_files": ${{ steps.changes.outputs.files }}
56 }