worktree: convert module vars to the | default form so consumer overrides take effect

Đang mở
#57 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
tooling

Hướng nghiên cứu

Read src/taskfile-include-worktree.yaml alongside the module conventions in CLAUDE.md, then inspect the existing mkdocs defaults and tests/worktree-selftest.sh. Add a consumer wrapper that passes an override at the includes: site and confirms it takes effect; update the README note. Done when all five variables use self-contained defaults, the self-test passes, and the documentation reflects the change.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

src/taskfile-include-worktree.yaml declares WORKTREE_ROOT_DEFAULT, WORKTREE_BASE_REF, WORKTREE_FETCH_REMOTE, WORKTREE_FETCH_BRANCH and WORKTREE_ALLOWED_PREFIXES as plain literals (e.g. line 17: WORKTREE_ALLOWED_PREFIXES: "feat fix chore docs exp"). Per the module conventions in CLAUDE.md, a plain literal in a module's own vars: wins over the value a consumer passes at the includes: site, so every documented override (README variables table, docs/*/references/modules/worktree.md override example with WORKTREE_BASE_REF: "origin/main") is silently ignored.

Found in the member verification pass of group 2026-11-05-worktree-add-hardening (#53/#54): following the docs and passing WORKTREE_ALLOWED_PREFIXES: "wip" at the include site, task worktree:add -- wip/x still fails with lacks an allowed prefix (feat fix chore docs exp).

Ask

  • Convert each var to '{{.NAME | default "<literal>"}}' with self-contained literal defaults (no derivation from another var in the block), as mkdocs already does.
  • Extend tests/worktree-selftest.sh with a consumer-wrapper case that overrides a var at the includes: site and asserts it takes effect (the self-test already resolves the prefix list through Task, so it survives the conversion).
  • Note that an exported environment variable of the same name then reaches the default too (the self-test already unsets WORKTREE_*).
  • Update README's "Today mkdocs alone uses that form" note.
Ngôn ngữ chính
Shell
Star
0
Fork
0
Merge trung bình
11 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nolte/taskfiles

Tất cả issue của nolte/taskfiles

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.