Dev scripts that are general for all repos.
Find a file
2026-07-16 07:26:49 +00:00
hooks fix(hooks): make hooks executable; classify unverifiable signatures 2026-07-16 09:23:42 +02:00
scripts feat(issues): bash issue-validate + canonical schema 2026-07-16 09:25:14 +02:00
.gitignore Initial commit 2026-07-15 21:28:42 +00:00
issue.schema.json feat(issues): bash issue-validate + canonical schema 2026-07-16 09:25:14 +02:00
README.md docs: rewrite README for the submodule 2026-07-16 09:25:24 +02:00

wulf-dev

Shared local developer tooling — git hooks and Forgejo helper scripts — consumed as a git submodule so it lives in one place instead of being copied (and re-broken) per repo.

This is the local/developer counterpart to ci-actions: ci-actions runs in Forgejo Actions (referenced by uses: tag); wulf-dev runs on a developer's machine from a checkout (referenced as a submodule).

Contents

Path What it does
hooks/pre-commit Blocks direct commits to main.
hooks/pre-push Rejects any unsigned commit in what's being pushed.
scripts/install-hooks.sh Points the consuming repo's core.hooksPath at hooks/.
scripts/pr.sh Opens a Forgejo PR from the current (or given) branch.
scripts/issue-new.sh Creates the next issues/NNNN.yaml from the template.
scripts/issue-validate.sh Validates issues/*.yaml against issue.schema.json.
scripts/lib.sh Shared helpers (repo_root, yaml_dq); sourced, not executed.
issue.schema.json Canonical contract for the issue-file format (shipped here, defined once).

Every script operates on the consuming (super)project, not on this submodule — repo_root resolves the superproject working tree, so .env and issues/ are read from the repo that embeds wulf-dev. The issue format, by contrast, is defined once here (issue.schema.json) rather than per repo.

Consuming it

From the root of a repo that should use this tooling:

git submodule add https://forgejo.wulf.science/WulfScience-FOSS/wulf-dev.git modules/wulf-dev
bash modules/wulf-dev/scripts/install-hooks.sh

Invoke the scripts by their submodule path (there are no wrappers):

bash modules/wulf-dev/scripts/pr.sh --title "..."
bash modules/wulf-dev/scripts/issue-new.sh "Title" [--type bug] [--milestone "..."]
bash modules/wulf-dev/scripts/issue-validate.sh

Requirements in the consuming repo

  • pr.shjq + curl, and a gitignored .env at the repo root:
    FORGEJO_URL=https://forgejo.wulf.science
    FORGEJO_OWNER=...
    FORGEJO_REPO=...
    FORGEJO_TOKEN=...
    
  • issue-validate.shyq + jq (the CI tools image stdlib). The schema it validates against ships with this submodule (issue.schema.json), so there's nothing to add per repo.
  • pre-push — SSH commit signing configured (gpg.format ssh + gpg.ssh.allowedSignersFile); otherwise a genuinely-signed commit reports %G?=E and the push is rejected. Per-repo signing setup lives in the Standard template repo, not here.