mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
Hard-coded self-path references rot the moment the file moves: a header
comment ``# utils/foo/bar.py`` at the top of a module, a docstring
mentioning ``utils/foo/bar.py``, or a docs entry linking
``utils/foo/bar.py`` from inside ``utils/foo/bar.py`` itself all silently
desync from reality after the next ``git mv``.
The new lint walks every project file, computes its POSIX-style relative
path from PROJECT_ROOT, and reports any line whose text contains that
path as a substring. Files at the repo root (no ``/`` in their relative
path) and setuptools-generated ``*.egg-info/`` artefacts are exempt.
Per-line opt-out via ``# nocheck: self-path-reference`` on the offending
line, registered in the suppression catalog.
Existing offenders cleaned up:
- 72 redundant ``# <self-path>`` header lines removed across roles,
cli, plugins, scripts, tests, and utils.
- 4 prometheus templates that told consumers to "update
<self-template-path>" rewritten to drop the redundant self-reference.
- 8 docstring/comment self-references in cli, plugins, tests, utils,
and the dashboard oidc.js.j2 header rewritten to describe the layout
without naming the file's own path.
- 17 legitimate usage examples (shell scripts, test data lists, one
template self-include doc-block) marked with ``nocheck:
self-path-reference``.
- ``container.sh`` heredoc usage strings switched to ``${0}`` so the
marker stays out of the user-visible help output.
- ``healthcheck/http.yml.j2`` doc-block rewritten to prose because
``{# ... #}`` Jinja comments cannot host an inner ``{# nocheck #}``
(the inner ``#}`` closes the outer comment).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GitHub Workflow Helpers 🔧
This is the SPOT for GitHub workflow helper scripts under scripts/github/.
These helpers are called from .github/workflows/.
For the repository Make target index, see make.md.
Entry Points 📋
| Script | What it does | Used by |
|---|---|---|
cancel_deleted_branch_runs.sh |
Cancels active workflow runs for a deleted branch. | .github/workflows/delete-branch.yml |
cancel_pull_request_runs.sh |
Cancels active workflow runs for a closed pull request. | .github/workflows/cancel-pull-request-runs.yml |
check_git_changes.sh |
Emits a changed=true/false workflow output based on git diff. |
.github/workflows/update.yml |
install_update_python.sh |
Installs Python dependencies needed by the automated update workflows. | .github/workflows/update.yml |
open_update_pr.sh |
Commits update changes, pushes the branch, and creates or refreshes the matching Pull Request. | .github/workflows/update.yml |
update_docker_image_versions.sh |
Runs the Docker image version updater CLI from GitHub Actions. | .github/workflows/update.yml |