Universal code quality gate for the Jordan ecosystem. Enforces consistent standards across all repositories.
Add to your repository's workflow:
name: Gate
on: [pull_request]
jobs:
gate:
runs-on: ubuntu-latest
permissions:
contents: write # Required for auto-merge
checks: write # Required for check status
pull-requests: write # Required for PR comments
steps:
- uses: actions/checkout@v4
- uses: synapse-sentinel/gate@v1
with:
coverage-threshold: 100The Gate action requires specific workflow permissions to function properly:
contents: write- Enables auto-merge on approved PRschecks: write- Allows creating check runs with statuspull-requests: write- Enables posting coverage reports and verdict comments
Without these permissions, the action will run successfully but features will silently fail (e.g., no PR comments, no auto-merge).
- Tests & Coverage: Runs
pest --coverage --min=X - Security Audit: Runs
composer auditfor vulnerabilities - Pest Syntax: Validates all tests use
describe()/it()blocks
- Issue intent matching
- Architectural compliance
- Over/under-engineering detection
| Input | Description | Default |
|---|---|---|
coverage-threshold |
Minimum test coverage % | 100 |
php-version |
PHP version to use | 8.3 |
| Output | Description |
|---|---|
verdict |
approved, rejected, or escalate |
reason |
Human-readable explanation |
- Approved → Green check, exit 0
- Rejected → Red X with annotations, exit 1
- Escalate → Requires human review, exit 1
# Run gate on current directory
php gate run --coverage=100
# Run with lower threshold
php gate run --coverage=80# Install dependencies
composer install
# Run tests
vendor/bin/pest
# Run with coverage
vendor/bin/pest --coverage --min=100GPL-3.0