feat(action): JS Action for uses: intentius/github-warden@v1 - #3
Merged
Merged
Conversation
- action.yml: 9 inputs (command, config, mode, cycles, app-id, installation-id, private-key, fail-on, allow-guardrail-override) - src/action.ts: reads INPUT_* env vars, builds argv, calls run() - action/index.mjs: committed esbuild bundle (node20 entrypoint) - cli.ts: skip self-invoke guard when built into action bundle (GITHUB_WARDEN_IS_ACTION defined at build time via esbuild --define) - build:action script in package.json - CI staleness check: build:action + git diff --exit-code action/index.mjs - src/action.test.ts: input→argv mapping + required-input validation - README: uses: intentius/github-warden@v1 section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
action.ymlat repo root: node20 JS Action with 9 inputs (command, config, mode, cycles, app-id, installation-id, private-key, fail-on, allow-guardrail-override)src/action.ts: readsINPUT_*env vars, maps to CLI argv, calls the existingrun()export — no net-new auth code, passes private-key throughGOVERNANCE_APP_PRIVATE_KEYfor the existing CLI pathaction/index.mjs: committed esbuild bundle (the file Actions runners execute); NOT in.gitignorecli.ts: one-line guard change — skips self-invoke whenGITHUB_WARDEN_IS_ACTIONis set; esbuild--definestatically resolves this tofalsein the action bundle so the guard is dead codebuild:actionscript inpackage.jsonnpm run build:action && git diff --exit-code action/index.mjssrc/action.test.ts: 11 tests covering input→argv mapping for reconcile dry-run, reconcile apply+cycles, audit+fail-on, allow-guardrail-override, and required-input validationTest plan
checkjob passes (typecheck + tests + staleness guard)node action/index.mjssimulation: missingconfiginput → exit 2 + clear message; audit with bad key → exit 3 from auth error (not a crash)🤖 Generated with Claude Code