Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/build-explainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ name: Build Explainers
on:
push:
branches: [main]
paths:
- "explainers/**.md"
- "assets/explainers-data.json"
- "scripts/build_explainers.py"
- "scripts/generate_og_images.py"
pull_request:
paths:
- "explainers/**.md"
Expand All @@ -35,7 +40,7 @@ jobs:
python-version: "3.11"

- name: Install Pillow (OG image generation)
run: python -m pip install --upgrade pip pillow
run: python -m pip install --upgrade pip "pillow==11.1.0"

- name: Generate explainer pages, data.js, and sitemap
run: python3 scripts/build_explainers.py
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/frozen-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ jobs:
# Diff against the merge-base, not the base branch tip directly -
# a two-dot diff (base_sha..head_sha) can include files main picked
# up after this PR branched, which aren't actually part of the PR.
merge_base="$(git merge-base \
"${{ github.event.pull_request.base.sha }}" \
"${{ github.event.pull_request.head.sha }}")"
changed_files="$(git diff --name-only \
"$merge_base" \
"${{ github.event.pull_request.head.sha }}")"

if [ "${{ github.event_name }}" = "pull_request" ]; then
merge_base="$(git merge-base \
"${{ github.event.pull_request.base.sha }}" \
"${{ github.event.pull_request.head.sha }}")"
changed_files="$(git diff --name-only \
"$merge_base" \
"${{ github.event.pull_request.head.sha }}")"
else
changed_files="$(git diff --name-only \
"${{ github.event.before }}" \
"${{ github.sha }}")"
fi
blocked=""

while IFS= read -r file; do
Expand Down Expand Up @@ -75,7 +80,7 @@ jobs:
done <<< "$changed_files"

if [ -n "$blocked" ]; then
echo "::error::This PR modifies files protected by CLAUDE.md §1."
echo "::error::Protected files were modified."
echo
echo "Protected files:"
printf "%s" "$blocked"
Expand Down