Skip to content

feat: add TurkStat (Turkey) and SingStat (Singapore) data sources #43

feat: add TurkStat (Turkey) and SingStat (Singapore) data sources

feat: add TurkStat (Turkey) and SingStat (Singapore) data sources #43

name: Validate Data Sources
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
paths:
- "firstdata/sources/**/*.json"
- "firstdata/schemas/datasource-schema.json"
jobs:
protect-schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Block schema modifications
run: |
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "firstdata/schemas/datasource-schema.json"; then
echo "❌ PRs must not modify firstdata/schemas/datasource-schema.json"
echo "Schema changes require direct commit to main by a maintainer."
exit 1
fi
validate:
needs: protect-schema
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
run: uv sync
- name: Validate all source JSON files
run: |
find firstdata/sources -name "*.json" | xargs uv run check-jsonschema \
--schemafile firstdata/schemas/datasource-schema.json
- name: Check for duplicate IDs
run: uv run python scripts/check_ids.py
claude-review:
needs: validate
if: github.event.sender.type != 'Bot'
continue-on-error: true
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code Review
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
claude_args: '--model ${{ secrets.CLAUDE_MODEL }} --max-turns 100 --allowedTools "Bash"'
prompt: '/review Review this PR and post your review as a PR comment using `gh pr comment`. Reply in the same language used in the PR (title, description, and comments).'
env:
ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }}