2021-08-29 21:23:02 +01:00
|
|
|
const Cache = require("@11ty/eleventy-cache-assets");
|
|
|
|
|
|
|
|
//todo: change this to actual repo when it's no longer private
|
2021-09-08 18:09:35 +01:00
|
|
|
const repo = "FreesideHull/FreesideWeb"
|
2021-08-29 21:23:02 +01:00
|
|
|
|
|
|
|
module.exports = async function() {
|
|
|
|
console.log( "Fetching github contribuitors" );
|
|
|
|
|
|
|
|
// GitHub API: https://developer.github.com/v3/repos/#get
|
|
|
|
return await Cache(`https://api.github.com/repos/${repo}/contributors`, {
|
|
|
|
duration: "1d", // 1 day
|
|
|
|
type: "json"
|
|
|
|
});
|
|
|
|
};
|