Repository navigation
ci: set up CI for the .github repo - #16
Merged
Merged
Conversation
Lint YAML (syntax and the GitHub schemas of issue forms, workflows, composite actions and the Dependabot configuration), Markdown (markdownlint), secrets (gitleaks) and workflows (actionlint), with hook revisions pinned to commits, as in the other repositories of the organisation. Add an .editorconfig consistent with the hooks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Run the pre-commit hooks in a Lint job on pull requests and pushes to main, with pinned action SHAs and read-only permissions. The gate job passed (CI passed) needs every other job and is the only check to require. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Group monthly updates of action pins (workflows and every composite action in actions/*) and of pre-commit hook revisions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideSets up the .github repository as a governed home for shared composite actions by adding pinned pre-commit and schema/security validation, SHA-pinned CI with an aggregate required-check gate, Dependabot and ownership configuration, and documented development and immutable release practices. Flow diagram for the CI lint and gate workflowflowchart LR
PR["Pull request or push to main"] --> Lint["Lint job"]
Lint --> Hooks["pre-commit run --all-files"]
Lint --> Secrets["pre-commit run --all-files --hook-stage manual gitleaks-all"]
Hooks --> Gate["CI passed gate"]
Secrets --> Gate
Gate --> Result["jq checks needs results"]
Result --> Status["Required check succeeds or fails"]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
uniqueg
marked this pull request as ready for review
October 28, 2026 05:06
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/ci.yml" line_range="67" />
<code_context>
+ run: |
+ failed="$(jq -r '
+ to_entries[]
+ | select(.value.result != "success")
+ | "\(.key): \(.value.result)"' <<< "${NEEDS}")"
+ if [[ -n "${failed}" ]]; then
</code_context>
<issue_to_address>
**Skipped checks block valid pull requests**
When a job is skipped by an `if:` condition, the `jq` filter populates `failed` for every result other than `success`, including `skipped`, so the gate exits nonzero and the required `CI passed` check blocks otherwise valid pull requests.
Change the filter so skipped jobs are not included in `failed`.
</issue_to_address>
### Comment 2
<location path="README.md" line_range="35" />
<code_context>
+
+```sh
+pre-commit install
+pre-commit run --all-files
+```
</code_context>
<issue_to_address>
**Local checks miss unstaged secrets**
When a developer follows the documented checks and a secret is outside the staged diff, `pre-commit run --all-files` omits the manual-stage `gitleaks-all` hook, so the full checkout is not scanned and the developer's local checks miss the secret.
Add a command that runs `gitleaks-all` across all files at the manual stage.
Also at `.pre-commit-config.yaml:41`.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: .github/workflows/ci.yml:67, README.md:35
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Sets up the
.githubrepo so that it can host shared composite actions:.pre-commit-config.yaml: the hooks the other repos use for the same files (pre-commit-hooks, gitleaks incl. the manual-stagegitleaks-all, actionlint), plus check-jsonschema for GitHub's schemas (issue forms and theirconfig.yml, workflows,action.ymlinactions/<name>/, Dependabot) and markdownlint-cli2 for Markdown. All revisions pinned to commits (# frozen:)..github/workflows/ci.yml(CI):lint(Lint) runs the hooks;passed(CI passed) is the gate (needs:every other job,if: always(), fails on anything but success). Nopaths:filters,permissions: contents: read(gate:{}), action SHAs pinned. There is notestjob yet, as there is no action to test; ci: add a PR title check action #13 adds it with the first action..github/dependabot.yml: grouped monthly updates forgithub-actions(directories: ["/", "/actions/*"], so new actions need no new entry) andpre-commit..github/CODEOWNERS: catch-all plus/actions/and/.github/workflows/, in the org's format.RELEASING.md(tags, immutable releases, no moving major tags, breaking changes only in majors, release notes format) and a Development section in the README;.editorconfigas in the other repos.Closes #12
Light lane
CI and docs only; no secrets, no permissions beyond
contents: read, no release workflow. I reviewed the diff myself instead of running the reviewer subagents.Verification
pre-commit run --all-filesandpre-commit run --all-files --hook-stage manual gitleaks-all: all passed.config.ymlvalue, a duplicate key inci.yml, an invalid Dependabot interval, Markdown heading errors and an invalidactions/broken/action.yml. Each one made its hook fail (check-yaml, the check-jsonschema hooks, actionlint, markdownlint-cli2); a validactions/good/action.ymlpassed.actionlintwith shellcheck andzizmor --offlineonci.yml: no findings.Lint,CI passed); every hook ran on the runner.Declined review findings
CI passedgreen.Maintainer settings (not in this PR)
These need an admin:
mainrequiringCI passed(source: GitHub Actions), once the check has reported on this PR.actionslanguage.v1.0.0comes with the first action).🤖 Generated with Claude Code