Just thinking about it now: it may be necessary if merging into a non-master branch (because, iirc, Github only automatically closes based on pushes to master). Could this run `state="merged"` instead?

(Or at least, be wrapped in a `if <not merging into master>: ...`)