1
0
mirror of https://github.com/bigchaindb/github-projects.git synced 2024-12-29 16:17:49 +01:00

include topics

* closes #8
This commit is contained in:
Matthias Kretschmann 2017-06-28 20:15:45 +02:00
parent 074de3aca0
commit 5e05f69ba3
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -23,7 +23,9 @@ const handleResponse = res => {
// Request options for all fetch calls // Request options for all fetch calls
const options = { const options = {
headers: { headers: {
Accept: 'application/vnd.github.preview' // For getting topics, see note on https://developer.github.com/v3/search/
Accept: 'application/vnd.github.mercy-preview+json'
// Accept: 'application/vnd.github.preview'
} }
} }
@ -49,14 +51,16 @@ const fetchRepos = () => {
html_url, html_url,
stargazers_count, stargazers_count,
forks_count, forks_count,
fork fork,
topics
}) => ({ }) => ({
name, name,
description, description,
url: html_url, url: html_url,
stars: stargazers_count, stars: stargazers_count,
forks: forks_count, forks: forks_count,
is_fork: fork is_fork: fork,
topics
})).sort((p1, p2) => })).sort((p1, p2) =>
p2.stars - p1.stars p2.stars - p1.stars
) )