semfora-ai/Semfora Gate

Semantic PR gate: checks a pull request against your team's policy in semfora.toml (protected domains, load-bearing edits, new cross-module dependencies, complexity budgets). Analysis runs in Semfora's isolated cloud pipeline via your GitHub App connection — nothing runs on your runner, and the report contains symbol names and numbers only.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
semfora-keyYour Semfora license key (from the semfora.ai dashboard). Required — the action verifies it before running. Store it as a repository or organization secret.yes
baseBase sha to gate against. Defaults to the pull request base sha from the workflow event.no
poll-timeout-minutesHow long to wait for the cloud gate run to finish before failing the step. First-time indexes of very large repos may need more.no20
api-urlSemfora API base (self-hosted deployments only).nohttps://semfora.ai
required-reviewersComma/space-separated GitHub usernames (and org/team slugs, e.g. "my-org/platform") to request as reviewers on the PR. Users must be contributors on the repo (collaborators) — each entry is validated and people without repo access are skipped with a warning. Requires the workflow to grant `pull-requests: write`.no
request-reviewers-onWhen to file the review request: "fail" (default — only when the gate finds policy errors), "always", or "never".nofail
require-approval"true" — a policy failure only passes once one of the required reviewers approves the PR at its current head commit (stale approvals don't count). "admin" — the approval must come from someone with admin permission on the repo. Add the `pull_request_review: [submitted]` trigger so the check re-runs when they approve; mark the check required in branch protection to make this binding.nofalse
require-reason"true" — a failing gate stays red until someone explains the change in a PR comment mentioning @semfora (at least 10 characters of reason; accepted from the PR author or a repo collaborator, never bots). The comment re-runs the gate via the issue_comment trigger (add it to this workflow's `on:` and grant `actions: write`), the check turns green, and the reason is recorded on semfora.ai together with the denied domains and quality deltas it covers. Combinable with require-approval — then a failure needs the approval AND the reason. Off by default.nofalse
line-comments"true" (default) — annotate the exact lines the policy rules hit, attached to the single gate review (deduplicated across runs; hits outside the diff stay in the gate report comment). Requires `pull-requests: write`.notrue
request-changes"true" (default) — while the policy verdict is fail, the gate review is submitted as Changes Requested (one line naming the restricted domains), and dismissed automatically once the gate passes or the failure is waived. Requires `pull-requests: write`.notrue
facts"on" (default) — the report comment includes the "Facts introduced" section: AST-proven properties this change adds (empty catch handlers, returns in finally, exit-free loops, per-iteration IO, identical branches, self-comparisons, literal if-conditions, discarded async promises…), AI-triaged server-side so receiver-type misreads and test-scaffolding noise stay hidden. "off" removes the section.noon
pr-commentPost the gate report as a sticky PR comment (edited in place on each run): linked findings, the domains the PR touches (colored to match the semfora.ai dashboard), the measured quality impact, and the generated graphs. "on-findings" (default — comment when there are errors or warnings, and keep refreshing an existing comment), "always", or "never". Requires `pull-requests: write`.noon-findings
github-tokenToken for the reviewer API calls. Defaults to the workflow token; only needed explicitly if you want reviewer requests to come from a bot/app identity.no${{ github.token }}
namedescription
verdict"pass" or "fail" — the gate verdict (before any waiver).
errorsNumber of error-severity policy findings.
warningsNumber of warning-severity policy findings.
waived"true" when a policy failure was waived — by a qualified approval of the current head commit (require-approval), an accepted @semfora change reason (require-reason), or both when both are configured.
denied-domainsComma-separated restricted domains hit at error severity (empty when none) — the domains that caused a policy denial.
domains-touchedComma-separated domains (semfora.toml groups) whose symbols this PR changes, denied or not (empty when the repo defines no groups).
reasonThe accepted @semfora change reason (single line, capped at 500 chars; empty when none was given or require-reason is off).
reason-authorGitHub login of whoever provided the accepted reason.