| 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 = '' |