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/cli — e.g. @tanstack/query
13# docs/** — e.g. docs/**
14# src/** — e.g. packages/query-core/src/**
15
16name: Notify Intent
17
18on:
19 push:
20 branches: [main]
21 paths:
22 - 'docs/**'
23 - 'src/**'
24
25jobs:
26 notify:
27 name: Notify TanStack Intent
28 runs-on: ubuntu-latest
29 steps:
30 - name: Checkout
31 uses: actions/checkout@v4
32 with:
33 fetch-depth: 2
34
35 - name: Collect changed files
36 id: changes
37 run: |
38 FILES=$(git diff --name-only HEAD~1 HEAD | jq -R -s -c 'split("\n") | map(select(length > 0))')
39 echo "files=$FILES" >> "$GITHUB_OUTPUT"
40
41 - name: Dispatch to intent repo
42 uses: peter-evans/repository-dispatch@v3
43 with:
44 token: ${{ secrets.INTENT_NOTIFY_TOKEN }}
45 repository: TanStack/intent
46 event-type: skill-check
47 client-payload: |
48 {
49 "package": "@tanstack/cli",
50 "sha": "${{ github.sha }}",
51 "changed_files": ${{ steps.changes.outputs.files }}
52 }