adding more support for older version of Github API and error handling on Push Events when object return empmty from API