noirbizarre / noirbizarre/rust.tpl

No `note_file`: `git tpl init` ends silently, and two required setup steps are documented nowhere

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Jinja
Stars
2
Forks
0
Avg merge
30m
Merged PRs (30d)
6

Description

template.toml declares neither note nor note_file, so git tpl init finishes with "Remote origin added." and nothing else. A rendered project does not work until roughly a dozen manual steps have been done, and the user is left to discover them by opening files.

git-tpl renders files and executes nothing (ADR-019), so this is exactly the affordance note_file exists for.

Two steps are documented nowhere at all

template/CONTRIBUTING.md.jinja:77-88 covers the release requirements well. These two are missing from it and from every other rendered file:

GitHub Pages must be set to Source: GitHub Actions. {% if docs %}docs.yaml{% endif %}:44-53 uses actions/deploy-pages@v5 against the implicit github-pages environment. Without the setting the first deploy fails, after a green build, with an error that does not name the setting.

Codecov onboarding. ci.yaml:97-110 uses codecov/codecov-action@v7 with no token:. Correct for a public repository and silently broken for a private one — the upload fails and the badge in the README, which is rendered unconditionally, stays grey. Nothing anywhere mentions CODECOV_TOKEN.

The full set, for reference

Local, before the first commit:

  1. mise install
  2. prek install — installs both pre-commit and commit-msg hook types
  3. rustup, for the channel in rust-toolchain.toml (deliberately not mise-managed)
  4. node/npm on PATH at commit time, for the commitlint hook (see #5)

Repository settings:

  1. A release environment with variable APP_CLIENT_ID and secret APP_PRIVATE_KEY
  2. The GitHub App those belong to, installed, with push and pull-request permissions
  3. Squash-merge settings: squash_merge_commit_title: PR_TITLE, squash_merge_commit_message: BLANK
  4. GitHub Pages → Source: GitHub Actions, when docs = true — undocumented
  5. Codecov, and CODECOV_TOKEN if the repository is private — undocumented
  6. crates.io Trusted Publishing for owner/repo, workflow publish-release.yaml, environment release, when publish = true
  7. Ownership of the crate name on crates.io, when publish = true

5, 6, 7 and 10 are in CONTRIBUTING.md, but only for someone who thinks to open it before pushing — and the first thing most people do after git tpl init is push.

What python.tpl did

python.tpl added NEXT-STEPS.md.jinja at the repository root, referenced as note_file, with the steps gated on the answers — so a project with pypi = false, docs = false is not told to configure Trusted Publishing or Pages. It ends by pointing at CONTRIBUTING.md for everything else, which keeps the note short enough to read in the terminal.

The {% if publish %} / {% if docs %} conditionals in CONTRIBUTING.md.jinja:87-88 show this template already has the machinery.

One trap worth knowing before implementing

note_file is a top-level manifest key, so it must be declared above every table in template.toml — above [questions.*], [data.*], [computed] and [remotes]. TOML assigns a bare key written after a table header to that table, so note_file placed after [computed] silently becomes a computed value and the note never appears, and after [remotes] it becomes a Git remote that git tpl init cheerfully adds. Neither errors and git tpl lint cannot see either. I hit both while building python.tpl; see noirbizarre/git-tpl#80.

Found while building python.tpl.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with template.toml and template/CONTRIBUTING.md.jinja, then compare python.tpl’s NEXT-STEPS.md.jinja and note_file setup. Check the docs.yaml and ci.yaml references, run git tpl lint and git tpl init with different docs and publish answers, and verify the rendered note contains the relevant setup steps without irrelevant ones.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github-actions, rust
Domain
devops, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.