Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

fix(gates): the release-notes ledger reads whole histories, and says so when it cannot

esengine74eb3cdbf6b0
diff --git a/.github/actions/editor-checkout/action.yml b/.github/actions/editor-checkout/action.yml
index 2f9afbc7c..52014e1e2 100644
--- a/.github/actions/editor-checkout/action.yml
+++ b/.github/actions/editor-checkout/action.yml
@@ -13,6 +13,10 @@ inputs:
ssh-key:
description: Private half of the estella-editor read-only deploy key.
required: true
+ history:
+ description: "'full' for the editor's whole history, which a gate reading its commits needs; otherwise one commit."
+ required: false
+ default: shallow
runs:
using: composite
@@ -21,6 +25,7 @@ runs:
shell: bash
env:
EDITOR_SSH_KEY: ${{ inputs.ssh-key }}
+ HISTORY: ${{ inputs.history }}
run: |
set -euo pipefail
if [ -z "${EDITOR_SSH_KEY}" ]; then
@@ -38,5 +43,9 @@ runs:
# .gitmodules names the https URL so a developer with account access can
# clone it without a key; the deploy key is SSH-only, hence the rewrite.
git config --global url."[email protected]:esengine/estella-editor".insteadOf "https://github.com/esengine/estella-editor"
- git submodule update --init --depth 1 desktop
+ if [ "${HISTORY}" = full ]; then
+ git submodule update --init desktop
+ else
+ git submodule update --init --depth 1 desktop
+ fi
test -f desktop/package.json
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 65714dc8d..6a4b83396 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -197,6 +197,10 @@ jobs:
steps:
- uses: actions/checkout@v7
+ with:
+ # The release-notes ledger reads every commit since a release tag, in both
+ # repositories; one commit of each reads as thirty entries naming nothing.
+ fetch-depth: 0
# Eighteen gates in the list need the editor. Without its checkout the runner
# named them and ran none, on every push — the release-notes ledger went red
@@ -204,6 +208,7 @@ jobs:
- uses: ./.github/actions/editor-checkout
with:
ssh-key: ${{ secrets.EDITOR_SSH_KEY }}
+ history: full
- uses: ./.github/actions/setup
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index cb460e369..c29736bdb 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -205,6 +205,7 @@ jobs:
- uses: ./.github/actions/editor-checkout
with:
ssh-key: ${{ secrets.EDITOR_SSH_KEY }}
+ history: full
- uses: ./.github/actions/setup
- uses: ./.github/actions/render-host
- uses: ./.github/actions/editor-host
diff --git a/tools/check-changelog-covers.mjs b/tools/check-changelog-covers.mjs
index b93d9dccb..7c1e587f2 100644
--- a/tools/check-changelog-covers.mjs
+++ b/tools/check-changelog-covers.mjs
@@ -50,6 +50,21 @@ if (!existsSync(CHANGELOG)) {
}
const changelog = readFileSync(CHANGELOG, 'utf8');
+// A checkout without the history cannot answer: every entry would read as naming
+// no commit. A shallow CI clone reported thirty of them before this said so.
+const hasCommit = (rev, cwd = ROOT) => !!rev && !!git(['rev-parse', '--verify', '--quiet', `${rev}^{commit}`], cwd).trim();
+const desktopGit = existsSync(path.join(ROOT, 'desktop', '.git'));
+const unreadable = [
+ ...(hasCommit(NOTES_FLOOR) ? [] : [`${NOTES_FLOOR} is not in this checkout`]),
+ ...(!desktopGit || hasCommit(gitlinkAt(NOTES_FLOOR), path.join(ROOT, 'desktop'))
+ ? [] : [`the editor commit ${NOTES_FLOOR} points at is not in desktop/`]),
+];
+if (unreadable.length) {
+ console.error(`check-changelog-covers: cannot read the history it judges — ${unreadable.join('; ')}.`
+ + ' Fetch both repositories whole (fetch-depth: 0, and the editor without --depth).');
+ process.exit(2);
+}
+
// Everything since the floor, HEAD included: a feature is owed a note from the
// moment it lands, not from the moment somebody cuts a release.
const commits = [
diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjs
index dbd2ae32e..e30f41dfc 100644
--- a/tools/releaseNotes.mjs
+++ b/tools/releaseNotes.mjs
@@ -28,6 +28,9 @@ export const NOTES_FLOOR = 'v0.65.0';
* the reader recognises anyway.
*/
export const NOTED = {
+ 'fix(gates): the release-notes ledger reads whole histories, and says so when it cannot':
+ { internal: 'A repository gate; no creator runs it.' },
+
'fix(checks): camera-frustum takes a capture once two in a row agree on the viewport':
{ internal: 'An editor check; the editor did not change.' },