Repository navigation
feat(claude wrappers): use_project_plugins opt-in + bump action to v1.0.123 - #9
Conversation
…_plugins Add a boolean input use_project_plugins (default false) to both reusable workflows. When false, .claude/settings.json is ignored entirely — neither enabledPlugins nor extraKnownMarketplaces flow into the action's plugins and plugin_marketplaces inputs. When the file is present but the flag is off, a ::notice:: tells the caller how to opt in. Motivation: most non-trivial plugins ship skills with "ALWAYS invoke this skill before X" directives that cause the run to attempt tools (Read, Grep, Glob, Bash(git ...)) which aren't on the review wrapper's gh-only allowlist. A real run (leoherds/leoherd PR 157, run 25907551112) burned 8 minutes, 21 turns, and 13 permission denials before exiting without posting a review comment. extra_plugins and plugin_marketplaces remain functional regardless: sole source when use_project_plugins is off, appended to the project list when on. Callers who want plugins active must widen the allowlist (append_allow_list / override_allow_list on review, claude_args on mention) to match. README's plugin section is rewritten to lead with the new default and the rationale, the Security section is updated to point at the repo-permission API gate (the author_association text was stale), and the two example caller workflows are updated to match.
…pinned SHA) Picks up upstream PR #1312 (bump pinned Bun to 1.3.14), which fixes the "Internal error: directory mismatch ... tsconfig.json, fd 4" lines that appear at the end of every run on v1.0.111. Pinned SHA 51ea8ea73a139f2a74ff649e3092c25a904aed7e dereferenced from the v1.0.123 annotated tag.
Code ReviewOverviewThis PR makes two independent improvements:
Both changes are well-reasoned and the PR description clearly documents the root cause. The implementation is solid. A few observations below. What works well
Issues / suggestions1. Boolean env-var comparison is safe but fragile across YAML typesUSE_PROJECT_PLUGINS: ${{ inputs.use_project_plugins }}if [[ "$USE_PROJECT_PLUGINS" == "true" ]]; thenGitHub Actions serialises a boolean input to the string 2. Code duplication between the two workflowsThe entire plugin-resolution shell block is now copy-pasted verbatim between 3. Action SHA should be verifiedThe bump from 4. Notice is only emitted when
|
|
Thanks for the review. Addressing the one merge-gating point: SHA verification for v1.0.123 — confirmed via the annotated tag chain: The pinned SHA The other points (env-var stringification, workflow code duplication, notice-only-when-file-exists, jq schema strictness) are acknowledged as non-blocking. Merging via rebase to preserve the two-commit split. |
Review (post-merge)This PR is already merged and has an excellent existing review thread, so I'll keep this brief. The changes are sound. The One additional observation not in the existing reviewNo feedback when if [[ "$USE_PROJECT_PLUGINS" == "true" ]]; then
if [[ -f .claude/settings.json ]]; then
# ... existing parse logic ...
else
echo "::notice::use_project_plugins is true but .claude/settings.json was not found; no project plugins will be installed."
fi
elif [[ -f .claude/settings.json ]]; then
echo "::notice::..." # existing notice
fiWorth filing as a small follow-up issue rather than reopening this PR. Overall: the default-off approach is the right design, the implementation is correct, and the documentation improvements (README section rename, example workflow comments) are clear and actionable. Good work. |
Summary
use_project_pluginsboolean input (defaultfalse) to both reusable workflows. Gates the read of the caller's.claude/settings.json. When off, neitherenabledPluginsnorextraKnownMarketplacesflow into the action — the run uses only the wrapper inputs (extra_plugins,plugin_marketplaces). When the file is present and the flag is off, a::notice::tells the caller how to opt in.anthropics/claude-code-actionfromv1.0.111tov1.0.123(pinned SHA), picking up upstream PR #1312 (bump Bun to 1.3.14) which fixes the "Internal error: directory mismatch ... tsconfig.json, fd 4" lines that appear at the end of every run on v1.0.111.Motivation
A real review run (leoherds/leoherd#157) spent 8 minutes, ran 21 turns, and hit 13 permission denials before exiting without posting a comment. Root cause: the caller's
.claude/settings.jsondeclared 6 plugins, and several of those plugins' skills carry "ALWAYS invoke this skill before X" directives that demand tools (Read,Grep,Glob,Bash(git ...)) outside the review wrapper'sgh-only allowlist.Defaulting the project-plugin install to off makes the review and mention jobs match the wrapper's narrow tool surface out of the box. Callers who want plugin skills active opt in and widen the allowlist together.
Test plan
use_project_plugins; confirm the workflow installs no plugins, emits the::notice::, and posts a review comment.use_project_plugins: trueplusappend_allow_list: "Read,Grep,Glob,Bash(git:*)"; confirm plugins install and the review still completes.