ci(plugin): gate the path that ships straight to users, and fix one more line-oriented cap #84

Merged
bvandeusen merged 4 commits from dev into main 2026-07-29 08:55:58 -04:00
2 changed files with 12 additions and 10 deletions
Showing only changes of commit 1feef179d2 - Show all commits
+9 -8
View File
@@ -121,21 +121,22 @@ jobs:
container:
image: git.fabledsword.com/bvandeusen/ci-python:3.14
steps:
# Bare `uses:`, no `with:` block. Adding one made this action fail to
# extract on the act_runner ("Cannot find module .../dist/index.js") while
# every bare checkout in the same run succeeded — see run 3027. Nothing
# here needs `fetch-depth: 0` anyway: the version check diffs two trees,
# and a tree diff needs both trees, not a common ancestor. A depth-1 fetch
# of main's tip is enough, and cheaper.
- uses: actions/checkout@v6
with:
# The version-bump check diffs shipped plugin content against
# origin/main, so it needs history — a shallow clone can't resolve it
# and the check would fail loudly rather than pass blind.
fetch-depth: 0
# On main the comparison is against itself, so only the syntax and
# pattern checks are meaningful there.
# On main the comparison would be against itself, so only the syntax and
# pattern checks mean anything there.
- name: Check plugin hooks and manifest
run: |
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
python3 scripts/check_plugin.py --no-version
else
git fetch --no-tags origin main:refs/remotes/origin/main
git fetch --no-tags --depth=1 origin main:refs/remotes/origin/main
python3 scripts/check_plugin.py
fi
+3 -2
View File
@@ -171,8 +171,9 @@ def check_version_bump(base: str = "origin/main") -> None:
# of bug survives in the first place.
fail(
f"cannot resolve {base}, so the version-bump check could not run. "
f"Fetch it (checkout needs fetch-depth: 0) or pass --no-version "
f"deliberately."
f"Fetch it first — `git fetch --depth=1 origin main:refs/remotes/"
f"origin/main` is enough, since this diffs two trees and needs no "
f"common ancestor — or pass --no-version deliberately."
)
return