Extract a function to post status for non-mergeable PR
Reorganize logic so state change event can be handled and not causing infinite loop