Architecture
- Local AST processing: Rule evaluation and AST analysis run entirely inside your CI runner. Raigal Cloud does not clone or store your codebase.
- Immediate pending check: When a pull request opens or receives new commits, the GitHub App instantly registers a
"Raigal Quality Gate"check inin_progressstatus on the head commit. - Check run resolution: Once the CI runner posts scan metrics to
/v1/runs, Raigal Cloud matches the commit SHA and updates the check run with a detailed markdown summary. - Branch protection enforcement: The
"Raigal Quality Gate"check can be selected as a required status check in GitHub branch protection rules. - Automatic updates on merge or close: GitHub sends merge and close webhook events directly to the app, updating board cards without extra CI steps.
- Safety timeout: If a CI job is cancelled or fails before running
raigal ci, Raigal Cloud automatically cleans up orphaned pending check runs after 20 minutes to prevent PRs from being blocked indefinitely.
Setup: GitHub App and Actions
1
1. Install the GitHub App
- Open the Raigal Cloud GitHub App.
- Click Install.
- Choose your organization or personal account.
- Select all repositories or choose specific ones.
- Click Install & authorize.
2
2. Copy your organization token
- Sign in to your dashboard at app.raigal.dev.
- Open Settings.
- Under API Tokens, select Create new token.
- Name the token (e.g.,
ci-runner) and copy the generated key (rgl_live_...).
3
3. Add token to GitHub repository
- In your GitHub repository, open Settings > Secrets and variables > Actions.
- Click New repository secret.
- Set the name to
RAIGAL_TOKENand paste your key. - Click Add secret.
If you prefer not to manage static tokens, add
permissions: id-token: write to your workflow. Raigal Cloud validates the runner using GitHub OIDC directly.4
4. Add the GitHub Actions workflow
Create
.github/workflows/raigal.yml in your repository:Because the GitHub App receives
pull_request.closed events directly, you do not need an additional workflow to notify Raigal when PRs close.5
5. Require status check in branch protection
- In your GitHub repository, open Settings > Branches (or Rules > Rulesets).
- Under Branch protection rules, edit the rule for your default branch (
main). - Check Require status checks to pass before merging.
- Search for and select Raigal Quality Gate.
- Save changes.
Three-state quality gate verdicts
GitHub Check Runs and pull request cards evaluate results into three clear states:Standalone CI mode (without GitHub App)
If your organization policies prevent installing third-party GitHub Apps, you can run Raigal using GitHub Actions alone:1
1. Configure secret
In Settings > Secrets and variables > Actions, add
RAIGAL_TOKEN.2
2. Add workflow
Add
.github/workflows/raigal.yml using the workflow above. In standalone mode, the gate reports status as a standard Actions job.3
3. Add close sync workflow (optional)
To update the board when PRs close without the GitHub App, add a lifecycle sync workflow:
Tracking PRs on the board
In Raigal Cloud, open your repository board:- Pull requests column:
- Passed: shows the quality score (e.g.
94/100), author, source branch, and target branch. - Blocked: shows blocker counts and failing rule categories.
- Passed: shows the quality score (e.g.
- Inspection drawer:
- Click a card to open its detail panel.
- Review blocking findings with rule IDs, file paths, and line numbers.
- Inspect diff statistics and unified diff preview.
- Copy the
git checkoutcommand to inspect changes locally, or select Open on GitHub to jump directly to the pull request.