Skip to content
Source
Sign inSign up
TanStack/cli
Open History to see the last commit

notify-intent.yml

56 lines1.7 KB

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.
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​
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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/cli",
54 "sha": "${{ github.sha }}",
55 "changed_files": ${{ steps.changes.outputs.files }}
56 }