Skip to content
Merged
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
17 changes: 11 additions & 6 deletions .github/workflows/no-dist-changes.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# >>> SLOP <<<
# Generated by OpenAI GPT-5.2 Codex
name: Block dist changes
name: Block mixed dist changes
on:
pull_request:

Expand All @@ -11,12 +11,17 @@ jobs:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Fail on dist changes
- name: Fail on mixed dist changes
shell: bash
run: |
changed=$(git diff --name-only "origin/${{ github.base_ref }}...HEAD" -- dist/)
if [ -n "$changed" ]; then
echo "::error::Changes under dist/ are not allowed in PRs. Files under dist/ are updated by CI and don't need to be committed."
echo "$changed"
base="origin/${{ github.base_ref }}...HEAD"
dist_changed=$(git diff --name-only "$base" -- dist/)
other_changed=$(git diff --name-only "$base" -- . ':(exclude)dist/')
if [ -n "$dist_changed" ] && [ -n "$other_changed" ]; then
echo "::error::A PR must not mix changes under dist/ with changes elsewhere. Files under dist/ are updated by CI and don't need to be committed."
echo "Changes under dist/:"
echo "$dist_changed"
echo "Changes elsewhere:"
echo "$other_changed"
exit 1
fi
Loading