Try load Github configuration such as usernames from the local or global git config

def collect_github_config():
	"""
	Try load Github configuration such as usernames from the local or global git config
	"""
	github_config = {}
	for field in ["user", "token"]:
		try:
			github_config[field] = subprocess.check_output(["git", "config", "github.{}".format(field)]).decode('utf-8').strip()
		except (OSError, subprocess.CalledProcessError):
			pass
	return github_config