Auto-merge merges a pull request the moment its required reviews and checks pass. Once the repository allows it, anyone with write access can turn it on; a push by someone without write access, or a new base branch, cancels it:
gh repo edit --enable-auto-merge --delete-branch-on-merge
gh pr merge 9 --auto --rebaseOutput
✓ Edited repository binarybehemoth/booknest ✓ Rebased and merged pull request binarybehemoth/booknest#9 (Add a pull request template and an ...
Nothing blocked #9, so gh 29 merged it at once; auto-merge only waits when a rule holds a pull request back (Required Checks). Required conversation resolution is such a rule: no merge while any review thread is open. Resolve a thread with Resolve conversation or a GraphQL mutation; Sam's two threads on #7 were answered by 89dda77:
Q='query($n:Int!){repository(owner:"binarybehemoth",name:"booknest"){pullRequest(number:$n){
reviewThreads(first:10){nodes{id isResolved path}}}}}'
M='mutation($t:ID!){resolveReviewThread(input:{threadId:$t}){thread{isResolved path}}}'
for t in $(gh api graphql -f query="$Q" -F n=7 --jq '.data.repository.pullRequest
.reviewThreads.nodes[] | select(.isResolved | not) | .id'); do
gh api graphql -f query="$M" -f t="$t" --jq '.data.resolveReviewThread.thread'
doneOutput
{"isResolved":true,"path":"app.js"}
{"isResolved":true,"path":"test/api.test.js"}