ci: add lain architecture health badge - #117
Conversation
Plug-and-play demo of spuentesp/lain/.github/actions/lain-health-badge. The action boots a local lain server against the PR's workspace, calls get_health and architectural_observations, and posts the result as a sticky PR comment plus a 'lain/health-badge' commit status. Five lines of workflow + permissions; no lain-specific config in this repo beyond the uses: ref. Pinned to d4b81cd on lain's main (the commit with the latest action fixes); consumers can move to a tagged release when v0.7.3 ships.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e317786f1
ℹ️ 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".
|
|
||
| on: | ||
| pull_request: | ||
| branches: [master] |
There was a problem hiding this comment.
Trigger health checks for main PRs
When a PR targets main—the repository's active integration branch—this filter prevents the workflow from starting, so it never emits its architecture status or sticky comment. Existing CI workflows explicitly cover main (for example, .github/workflows/ci.yml:4-6); add main to this filter (or remove the target-branch restriction) so the new check runs on normal PRs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🟡 Changes recommended
The workflow as written is likely to fail (missing contents: read for checkout) and may not run on PRs targeting main due to an overly restrictive branch filter.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new GitHub Actions workflow to run the upstream spuentesp/lain/.github/actions/lain-health-badge composite action on pull requests, producing an architecture-health sticky PR comment and a lain/health-badge commit status.
Changes:
- Introduces
.github/workflows/lain-health.ymlto run the Lain health badge action on PRs. - Grants workflow-level permissions intended for posting commit statuses and PR comments.
File summaries
| File | Description |
|---|---|
.github/workflows/lain-health.yml |
New PR-triggered workflow wiring in the upstream Lain health badge action with status/comment permissions. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| permissions: | ||
| # The action posts a commit status and a sticky PR comment; the | ||
| # default GITHUB_TOKEN is read-only. | ||
| statuses: write | ||
| pull-requests: write |
| on: | ||
| pull_request: | ||
| branches: [master] | ||
|
|
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: spuentesp/lain/.github/actions/lain-health-badge@d4b81cd |
Architecture healthComputed by lain — thresholds: min-fan-out=15 Server healthArchitectural observations (fan-out >= 15) |
Plug-and-play demo of
spuentesp/lain/.github/actions/lain-health-badge. Adds a single workflow that boots a local lain server against the PR's workspace, callsget_healthandarchitectural_observations, and posts the result as a sticky PR comment plus alain/health-badgecommit status.Five lines of workflow + permissions. No lain-specific config in this repo beyond the
uses:ref. Pinned tod4b81cdon lain's main; consumers can move to a tagged release when v0.7.3 ships.