Skip to content

Commit 243250a

Browse files
committed
fix(devx): same history-fetch remedy in the two changeset diff gates
check-changeset-overwrite and check-changeset-presence printed the same shallow-clone remedy as check-changeset-claims. They now carry its wording, and the presence gate's shallow pin also asserts the step name. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jQqimUnb4io8LpGcvH
1 parent 18e761a commit 243250a

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎ui/scripts/__tests__/check-changeset-presence.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,7 @@ describe('a missing input is a failure, never a silent pass', () => {
914914
expect(run.status).toBe(1);
915915
expect(run.output).toMatch(/SHALLOW/);
916916
expect(run.output).toMatch(/fetch-depth: 0/);
917+
expect(run.output).toContain("Fetch this commit's history and the base branch");
917918
});
918919

919920
it('FAILS when .changeset/ does not exist', () => {

‎ui/scripts/check-changeset-overwrite.mjs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,10 @@ if (isEntrypoint(import.meta.url)) {
295295
' some other commit would answer a question nobody asked, and answer it\n' +
296296
' confidently. Name a commit that exists in this clone, or pass none.\n'
297297
: base.shallow
298-
? ' This clone is SHALLOW. In CI, give the checkout `fetch-depth: 0`; locally,\n' +
299-
' run `git fetch --no-tags origin main` (or `git fetch --unshallow`).\n'
298+
? ' This clone is SHALLOW. In CI, run the step\n' +
299+
" `Fetch this commit's history and the base branch` before this gate (ci.yml), or give the\n" +
300+
' checkout `fetch-depth: 0` (lint.yml); locally, run `git fetch --no-tags origin main`\n' +
301+
' (or `git fetch --unshallow`).\n'
300302
: ' Fetch the base branch (`git fetch --no-tags origin main`) and re-run.\n') +
301303
' A failure, not a skip: report-only means this gate declines to fail on its\n' +
302304
' FINDINGS, never that it passes without looking (objectstack#4928, objectui#4690).',

‎ui/scripts/check-changeset-presence.mjs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,10 @@ if (invokedDirectly) {
11001100
' confidently. Name a commit that exists in this clone, or pass none and let the\n' +
11011101
' merge base with the target branch be found.\n'
11021102
: base.shallow
1103-
? ' This clone is SHALLOW. In CI, give the checkout `fetch-depth: 0`; locally,\n' +
1104-
' run `git fetch --no-tags origin main` (or `git fetch --unshallow`).\n'
1103+
? ' This clone is SHALLOW. In CI, run the step\n' +
1104+
" `Fetch this commit's history and the base branch` before this gate (ci.yml), or give the\n" +
1105+
' checkout `fetch-depth: 0` (lint.yml); locally, run `git fetch --no-tags origin main`\n' +
1106+
' (or `git fetch --unshallow`).\n'
11051107
: ' Fetch the base branch (`git fetch --no-tags origin main`) and re-run.\n') +
11061108
' This is a failure, not a skip: a diff gate with no diff would report a\n' +
11071109
' declaration present while having looked at nothing (objectstack#4928).',

0 commit comments

Comments
 (0)