mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
Add tests/lint/repository/test_inline_script_block_size.py: scans
roles/, tasks/, playbooks/ and .github/ YAML for literal block scalars
(`|` / `|-` / `|+`) following the keys `shell`, `command`, `script`,
`raw` (Ansible) and `run` (GitHub Actions). Counts logical lines —
trailing-`\` continuations collapse to one line, blank lines are
ignored — and fails when a block exceeds 12.
FOLDED scalars (`>` / `>-` / `>+`) are exempt: they are one shell
statement after YAML folding, even if they span many source lines for
readability.
The walk goes through `utils.cache.files.iter_project_files(...)` per
`docs/agents/action/testing.md` so the shared project-tree cache is
reused across the lint suite.
The fail message tells the author exactly how to fix: Ansible tasks
get the built-in `script:` module (collapses the task to one line);
GitHub Actions workflows extract into `scripts/github/<name>.sh` and
call it via `run: bash scripts/github/<name>.sh` (or
`_helpers/scripts/github/<name>.sh` when the workflow checks out the
repo into `_helpers/`).
Extract the pre-existing literal-block offenders so the new lint
ships green:
Ansible (script: module, file under <role>/files/)
web-app-friendica sync_addon.sh
web-app-fider create_admin_user.sh
web-app-fider configure_oidc_provider.sh
web-app-mediawiki install_or_update.sh
web-app-mediawiki composer_install_extension.sh
web-app-xwiki debug_superadmin.sh
GitHub Actions (scripts/github/)
pick_distro.sh
guard_release.sh
resolve_release_inputs.sh
disk_pressure_report.sh
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 |