Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Release preflight: every credited @handle is a GitHub account (tools/release/check_credits.py over changes/ and the highlights; a Discord-only requester is 'name on Discord', no @); credits_self_test

islandmed11eb2f18c7be
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89e1b838..548492be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -807,6 +807,8 @@ if(SCULPTFORGE_BUILD_TESTS)
add_test(NAME media_takedown_self_test COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/media_takedown.py --self-test)
# The public gallery repository matches tools/brush-gallery/repo (the live compare is in release.sh: network).
add_test(NAME gallery_published_self_test COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/brush-gallery/check_published.py --self-test)
+ # Credited @handles are GitHub accounts (the live check is in release.sh's preflight: network).
+ add_test(NAME credits_self_test COMMAND ${Python3_EXECUTABLE} -I ${CMAKE_CURRENT_SOURCE_DIR}/tools/release/check_credits.py --self-test)
# The Claude Desktop bundle and its MCP registry entry (tools/release/build_mcpb.py, mcp_server_json.py): packed
# from the built CLI and its server run from the unpacked bundle, as packages.yml does on every OS.
add_test(NAME mcpb_self_test COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/release/build_mcpb.py --self-test)
diff --git a/scripts/release.sh b/scripts/release.sh
index 21e47cd1..2a996a53 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -308,6 +308,11 @@ preflight() {
gallery=$(python3 tools/brush-gallery/check_published.py 2>/dev/null) || rc=$?
[ $rc -ne 2 ] || die "$(head -1 <<<"$gallery")" "check the network and gh auth status, then run again"
[ $rc -eq 0 ] || die "the public gallery (islandmed/sculptforge-brushes) differs from tools/brush-gallery/repo: $(head -3 <<<"$gallery")" "copy tools/brush-gallery/repo into a clone of it, commit, push its main"
+ # Credits: every @handle in the notes is a GitHub account; a Discord-only requester is "name on Discord", no @.
+ local credits; rc=0
+ credits=$(python3 tools/release/check_credits.py 2>&1) || rc=$?
+ [ $rc -ne 2 ] || die "$credits" "check the network and gh auth status, then run again"
+ [ $rc -eq 0 ] || die "a credited @handle isn't a GitHub account: $credits" "fix the spelling, or for a Discord-only requester write \"thanks name on Discord\" (no @) in that changes/ file and the highlights, commit, run again"
grep -q '^set(SCULPTFORGE_PRERELEASE "[a-z0-9.]*")$' CMakeLists.txt ||
die "CMakeLists.txt lost its set(SCULPTFORGE_PRERELEASE \"\") line that step bump sets" "restore it under project() (git log -p CMakeLists.txt), commit"
python3 -c 'import json, sys; json.load(open(sys.argv[1]))' website/latest.json 2>/dev/null || die "website/latest.json is not valid JSON" "fix it, commit"
diff --git a/tests/release_beta_test.sh b/tests/release_beta_test.sh
index 222e81b9..8cc97064 100755
--- a/tests/release_beta_test.sh
+++ b/tests/release_beta_test.sh
@@ -72,6 +72,7 @@ runs() {
}
case "\$*" in
"auth status"*) echo "Logged in to github.com account islandmed" ;;
+ "api users/"*) exit 0 ;; # every credited handle is an account (tools/release/check_credits.py)
"secret list --env"*) printf 'INSIDERS_REPO_TOKEN\t2026-11-05T00:00:00Z\nUPDATE_SIGNING_KEY\t2026-11-05T00:00:00Z\n' ;;
"secret list"*) printf 'DISCORD_MEMBERS_WEBHOOK\t2026-11-05T00:00:00Z\n'; [ -z "\${SECRET_AT_REPO:-}" ] || printf 'UPDATE_SIGNING_KEY\t2026-11-05T00:00:00Z\n' ;;
"api repos/islandmed/SculptForge/actions/workflows/packages.yml/runs"*) runs "\$2" ;;
diff --git a/tools/release/check_credits.py b/tools/release/check_credits.py
new file mode 100644
index 00000000..1d1d2e42
--- /dev/null
+++ b/tools/release/check_credits.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python3
+"""Every @handle credited in the release notes is a GitHub account (release.sh preflight).
+
+Credits read "thanks @handle" and point at GitHub; a Discord-only requester is credited without the @ ("thanks name on
+Discord"), so a handle that isn't a GitHub account is a typo or a Discord name written as a GitHub one (0.11.13:
+@foirgairwolf). Reads changes/*.md and the HIGHLIGHTS file; asks `gh api users/<handle>` once per handle.
+ python3 tools/release/check_credits.py [FILE...] exit 1: a handle isn't on GitHub, 2: GitHub can't be asked
+ python3 tools/release/check_credits.py --self-test (offline: what counts as a handle)
+"""
+import glob
+import os
+import re
+import subprocess
+import sys
+
+# @handle as GitHub spells them (1-39 letters, digits, single hyphens), not inside an email address or a word.
+HANDLE = re.compile(r'(?<![\w.@/`])@([A-Za-z0-9](?:[A-Za-z0-9]|-(?=[A-Za-z0-9])){0,38})(?![\w@-])')
+
+
+def handles(text):
+ return {m.group(1) for m in HANDLE.finditer(text)}
+
+
+def exists(handle):
+ """True / False, or None when GitHub can't be asked (network, auth)."""
+ r = subprocess.run(["gh", "api", f"users/{handle}", "--silent"], capture_output=True, text=True)
+ if r.returncode == 0:
+ return True
+ return False if "404" in r.stderr or "Not Found" in r.stderr else None
+
+
+def self_test():
+ cases = {
+ "thanks @fenixpoints, #115": {"fenixpoints"},
+ "(thanks @kenttumanda123-netizen, #155)": {"kenttumanda123-netizen"},
+ "write to [email protected]": set(),
+ "thanks foirgairwolf on Discord": set(),
+ "`@media` in CSS, a decorator `@property`": set(),
+ "@a and @b-c, not @-x or @x-": {"a", "b-c"},
+ }
+ for text, want in cases.items():
+ got = handles(text)
+ if got != want:
+ print(f"check_credits self-test: {text!r} -> {sorted(got)}, expected {sorted(want)}")
+ return 1
+ print("check_credits self-test: ok")
+ return 0
+
+
+def main(argv):
+ if argv == ["--self-test"]:
+ return self_test()
+ files = argv or sorted(glob.glob("changes/*.md")) + [f for f in [os.environ.get("HIGHLIGHTS", "")] if f]
+ found = {}
+ for f in files:
+ if os.path.basename(f) == "README.md":
+ continue
+ with open(f, encoding="utf-8") as fh:
+ for h in handles(fh.read()):
+ found.setdefault(h, []).append(f)
+ missing, unknown = [], []
+ for h in sorted(found, key=str.lower):
+ ok = exists(h)
+ if ok is None:
+ unknown.append(h)
+ elif not ok:
+ missing.append(f"@{h} ({', '.join(found[h])})")
+ if missing:
+ print("not GitHub accounts: " + "; ".join(missing))
+ return 1
+ if unknown:
+ print("couldn't ask GitHub about: " + ", ".join("@" + h for h in unknown))
+ return 2
+ print(f"check_credits: {len(found)} handle(s), all on GitHub")
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main(sys.argv[1:]))