Some refactoring for gh status