refactored github status method