mirror of
https://github.com/bigchaindb/github-projects.git
synced 2024-12-29 16:17:49 +01:00
parent
074de3aca0
commit
5e05f69ba3
10
index.js
10
index.js
@ -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
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user