Skip to content

docs: prefer Drive handles across adapter heroes and guides #51

docs: prefer Drive handles across adapter heroes and guides

docs: prefer Drive handles across adapter heroes and guides #51

Workflow file for this run

# check-skills.yml — Validates intent skills on PRs. After a release or manual
# run, opens or updates one review PR when existing skills, artifact coverage,
# or workspace package coverage need review.
#
# Triggers: pull requests touching skills/artifacts, new release published, or
# manual workflow_dispatch.
#
# intent-workflow-version: 3
name: Check Skills
on:
pull_request:
paths:
- "skills/**"
- "**/skills/**"
- "_artifacts/**"
- "**/_artifacts/**"
release:
types: [published]
workflow_dispatch: {}
jobs:
validate:
name: Validate intent skills
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install intent
run: npm install -g @tanstack/intent@0.3.4
- name: Validate skills
run: intent validate --github-summary
review:
name: Check intent skill coverage
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install intent
run: npm install -g @tanstack/intent@0.3.4
- name: Check skills
id: stale
run: |
intent stale --github-review --package-label "@stainless-code/layers"
- name: Open or update review PR
if: steps.stale.outputs.has_review == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
VERSION="${RELEASE_TAG:-manual}"
BRANCH="skills/review-${VERSION}"
BASE_BRANCH="$DEFAULT_BRANCH"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin "$BRANCH" || true
if git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then
git checkout -B "$BRANCH" "origin/$BRANCH"
else
git checkout -b "$BRANCH"
git commit --allow-empty -m "chore: review intent skills for ${VERSION}"
git push origin "$BRANCH"
fi
PR_URL="$(gh pr list --head "$BRANCH" --json url --jq '.[0].url')"
if [ -n "$PR_URL" ]; then
gh pr edit "$PR_URL" --body-file pr-body.md
else
gh pr create \
--title "Review intent skills (${VERSION})" \
--body-file pr-body.md \
--head "$BRANCH" \
--base "$BASE_BRANCH"
fi