Skip to content

Commit 67ea7e8

Browse files
committed
chore: drop .changeset/*.md fallback in bump-plan step; JSON-only with env OR
1 parent aad1e51 commit 67ea7e8

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

.github/workflows/pull-request-snapshot-diff.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ jobs:
174174
run: npm ci
175175

176176
# Determine if the PR’s changesets imply a MINOR/MAJOR bump.
177-
# Primary source: changesets JSON; Fallback: inspect changed .changeset/*.md.
178-
- name: 🔎 Determine bump plan (JSON + Fallback)
177+
# Primary source: changesets JSON;
178+
- name: 🔎 Determine bump plan (JSON only)
179179
id: plan
180180
shell: bash
181181
run: |
@@ -197,30 +197,7 @@ jobs:
197197
} catch (_) {}
198198
process.stdout.write(`HAS_MINOR=${hasMinor}\nHAS_MAJOR=${hasMajor}\n`);
199199
NODE
200-
201-
# Fallback: if both are still 0, scan changed .changeset/*.md for 'minor'/'major'
202-
source .changeset-env || true
203-
if [ "${HAS_MINOR}" = "0" ] && [ "${HAS_MAJOR}" = "0" ]; then
204-
git diff --name-only origin/main...HEAD -- ".changeset/*.md" > .cs-files || true
205-
if [ -s .cs-files ]; then
206-
while read -r f; do
207-
[ -z "${f:-}" ] && continue
208-
if grep -E ':\s*minor\b' "$f" >/dev/null 2>&1; then HAS_MINOR=1; fi
209-
if grep -E ':\s*major\b' "$f" >/dev/null 2>&1; then HAS_MAJOR=1; fi
210-
done < .cs-files
211-
fi
212-
{
213-
echo "HAS_MINOR=${HAS_MINOR}"
214-
echo "HAS_MAJOR=${HAS_MAJOR}"
215-
} > .changeset-env
216-
fi
217200
cat .changeset-env >> "$GITHUB_ENV"
218-
{
219-
echo "### Bump Plan Detection"
220-
echo
221-
echo "- HAS_MINOR: ${HAS_MINOR}"
222-
echo "- HAS_MAJOR: ${HAS_MAJOR}"
223-
} >> "$GITHUB_STEP_SUMMARY"
224201
225202
# Guardrail: if snapshots changed, require at least MINOR (or MAJOR).
226203
# This prevents accidental PATCH releases for visual/markup-impacting changes.

0 commit comments

Comments
 (0)