MCPcopy Index your code
hub / github.com/EvanLi/Github-Ranking / parse_gql_result

Method parse_gql_result

source/process.py:104–121  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

102
103 @staticmethod
104 def parse_gql_result(result):
105 res = []
106 for repo in result["data"]["search"]["edges"]:
107 repo_data = repo['node']
108 res.append({
109 'name': repo_data['name'],
110 'stargazers_count': repo_data['stargazerCount'],
111 'forks_count': repo_data['forkCount'],
112 'language': repo_data['primaryLanguage']['name'] if repo_data['primaryLanguage'] is not None else None,
113 'html_url': repo_data['url'],
114 'owner': {
115 'login': repo_data['owner']['login'],
116 },
117 'open_issues_count': repo_data['openIssues']['totalCount'],
118 'pushed_at': repo_data['pushedAt'],
119 'description': repo_data['description']
120 })
121 return res
122
123 def get_repos(self, qql):
124 cursor = ''

Callers 1

get_reposMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected