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