feat: config-ready trio composite actions (typos, editorconfig, gitleaks) - #10
Conversation
…itleaks) Phase 1 of the CI de-duplication program: lift the three lanes whose tool config already lives in standards (modules/typos, modules/editorconfig, modules/gitleaks) into ci-workflows as granular composite actions, so both standards and medley can reference them instead of carrying inline copies. Each action follows the repo's established single-binary idiom (curl + sha256 checksum-pin, as shellcheck/lychee-offline do): self-contained, no nested third-party action, version and checksum as open-closed string inputs with behavior-preserving defaults. Tool versions/checksums verified against the GitHub releases API and corroborated (upstream checksums.txt for ec, taiki-e install-action manifest for typos, standards' recorded hash for gitleaks); findings recorded under docs/dedup-program/research/. Backfill beyond standards' current behavior, all optional and default-off: typos --format (incl. sarif), editorconfig --format github-actions, gitleaks --report-format/--report-path (sarif emit for caller-side code-scanning upload). Dogfooded in this repo's ci.yml behind the local ci-status gateway, with the matching configs vendored byte-identical from standards. typos/editorconfig/ gitleaks all verified locally against the tracked tree before push. Also ticks Phase 0 D6 (Actions access confirmed org-accessible) and the three Phase 1 action checkboxes in plan.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
standards added an explanatory header comment to its .gitignore that was never synced here, drifting the byte-identical vendored copy. Re-sync to restore lockstep; no ignore rules change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b0a0b3776
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| tar -xzf ec.tar.gz bin/ec-linux-amd64 | ||
| sudo install bin/ec-linux-amd64 /usr/local/bin/ec | ||
| rm -rf ec.tar.gz bin |
There was a problem hiding this comment.
Extract editorconfig into a temp dir
Composite action steps run in the caller's workspace, so in any consuming repo that has a top-level bin/ directory this cleanup removes the repo's own files after extracting bin/ec-linux-amd64. That can make later steps in the job fail or hide files from checks; extract the archive under $RUNNER_TEMP or another unique directory instead of deleting bin from the workspace.
Useful? React with 👍 / 👎.
| for e in $EXCLUDE; do args+=(--exclude "$e"); done | ||
| if [[ -n "${FORMAT// }" ]]; then args+=(--format "$FORMAT"); fi | ||
| # $PATHS unquoted so multiple targets word-split. | ||
| typos "${args[@]}" $PATHS |
There was a problem hiding this comment.
Add --force-exclude for explicit paths
When callers use the supported paths input as an explicit file list, typos does not apply configured or CLI excludes to those paths unless --force-exclude is set; the v1.47.2 help text says that flag is required to “Respect excluded files even for paths passed explicitly.” A pre-commit-style caller passing changed files can therefore still fail on files covered by exclude or [files].extend-exclude (for example minified/generated files), contrary to this action's exclude contract.
Useful? React with 👍 / 👎.
The config-ready trio is built, dogfooded, and adopted in standards (#10 here, standards#20). Tick the remaining Phase 1 checkbox and refresh the README status. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase 1 of the CI de-duplication program: lift the three lanes whose tool config already lives in
standards(modules/typos,modules/editorconfig,modules/gitleaks) intoci-workflowsas granular composite actions. Only the execution action was missing, so there is no config work — bothstandardsandmedleycan now reference these instead of carrying inline copies.What's here
Three composite actions under
.github/actions/, each following the repo's established single-binary idiom (curl + SHA-256 checksum-pin, likeshellcheck/lychee-offline): self-contained, no nested third-party action, composite gotchas handled (shell:on every step, nopost:, inputs passed via env).typoseditorconfigchecksums.txtgitleakspaths/path,config,exclude,version,sha256.typos --format(incl.sarif),editorconfig --format github-actions,gitleaks --report-format/--report-path(SARIF emit; the SARIF upload stays a caller-side job concern per D1/D7 — documented in the action and research note).docs/dedup-program/research/(version + invocation verified against the GitHub releases API and corroborated; nothing relied on from training data).Dogfood
Wired into
ci.ymlbehind the localci-statusgateway, with the matching configs vendored byte-identical from standards (sha256-confirmed, LF preserved). All three verified locally against the tracked tree before push (typos/editorconfig/gitleaks clean; the gitleaks default ruleset does not trip on the action checksums).Also
access_level: organization) and the three Phase 1 action checkboxes inplan.md..gitignorewith standards (a pre-existing vendoring-lockstep drift; header comment only, no rule change).Adoption in
standards(retiring its inline typos/editorconfig/gitleaks lanes, pinned to this PR's squash SHA) follows as a separate PR.