01 · GitHub Actions
Report on every pull request
enola-action compares each pull request with its base commit. It runs on the GitHub runner, uploads no source, and needs no stored baseline.
name: Architecture
on:
pull_request:
merge_group:
permissions:
contents: read
jobs:
enola:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: enola-labs/enola-action@v2With no inputs it reports and never fails the job. You get:
- a job summary of what the pull request changed in the architecture
- a warning on each line that introduced a finding, in Files changed
- a No policy set notice, so a green job is not mistaken for a verdict
Findings the repository already had stay out. Keep fetch-depth: 0, so that the base commit is available.
02 · Policy
Choose what fails
fail-on names the explainers whose new findings fail the job:
- uses: enola-labs/enola-action@v2
with:
fail-on: layers,cyclesmin-confidence is how sure Enola must be. The default, 1.00, means proven findings only, which five explainers can produce: cycles, intent, constraints, final-inheritance, and layers once you declare a layer order. Any other explainer also needs a lower floor:
- uses: enola-labs/enola-action@v2
with:
fail-on: layers,hotspots
min-confidence: "0.8"warn-only: "true" keeps a policy but turns its failures into warnings, for example while a team gets used to it.
03 · Options
Comments, reviewers and scope
| Input | What it does |
|---|---|
| pr-comment | Posts the report as one comment, edited on every push. Needs pull-requests: write. |
| reviewers | Names the owner of each module the change touched, and suggests a reviewer. Never fails the job. |
| target, max-spillover | Fails when a change reaches more packages than you allow outside its stated target. |
| sarif | Also writes the findings as SARIF, for code scanning. |
| version | Pins an Enola release instead of the latest. |
Every input is in the action's README. Its docs walk through what lands on a pull request and what fails a job.
04 · Other CI
Use the CLI anywhere
Install Enola, fetch the target branch, and compare with where this branch left it. Nothing is pinned, and nothing is written to the checkout:
enola check --base origin/main --fail-on=layers,cycles
Use a checkout with enough history to hold the merge-base. Exit code 0 passes, 1 is a policy failure, 2 means the check could not run, and 3 means the two sides cannot be compared. --warn-only reports without failing on findings.
05 · Output
Publish the evidence
enola check --base origin/main --format=annotations --host=github enola check --base origin/main --format=annotations --host=buildkite enola check --base origin/main --format=sarif > enola.sarif
Annotations are native messages for GitHub Actions or Buildkite, SARIF works with code-scanning systems, and --json is for your own scripts. Use the exit code as the verdict.
06 · Reproducibility
Keep both sides comparable
- --base and the action build both sides with one Enola version and configuration.
- With a pinned baseline, use the same Enola version, ignore configuration and repository identity for both.
- Pin an Enola release if a new one must not change your results.
- Keep the receipt with the job output.