jev-auto-approve
A pull request approver that asks Jev before it approves.
MetalBear’s action reads the diff and asks Jev whether it is the kind of change that can go in unattended. Everything else waits for a person.
# jev-auto-approve
A GitHub Action that asks [Jev](https://docs.typesafe.ai/api) whether a pull request needs a human
reviewer, and approves it when the answer is confidently no.
Jev is a decision model: it answers a typed question with a calibrated probability rather than
prose. This action asks it one yes/no question per thing worth being sure about — answered in
parallel in a single call — and approves only when every one of them clears your threshold:
```
Is this pull request ready to be merged as it stands? approve on yes
Is the behaviour this pull request changes covered by testing? approve on yes
Does this pull request require a human reviewer? approve on no
every question >= confidence-threshold -> approve
any question below it -> skip, and comment with the numbers
```
Because Jev's probabilities are calibrated, the threshold is a real dial: `0.95` approves a narrower
set of changes than `0.8`, and nothing gets approved while the model is torn about any one question.
Splitting the decision this way means a skip names *which* question held it back rather than
producing a single opaque number.
## Quick start
Approve on demand, when someone with write access comments `/jev-approve`:
```yaml
name: Jev auto-approve on comment
on:
issue_comment:
types: [created]
permissions:
contents: read
pull-requests: write
jobs:
auto-approve:
if: >-
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/jev-approve') &&
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
runs-on: ubuntu-latest
steps:
- uses: metalbear-co/jev-auto-approve@v1
with:
jev-api-key: ${{ secrets.TYPESAFE_API_KEY }}