Replace `get_revoke_commit_msgs` macro with a function