Files
lucide/scripts/githubApi.mjs
Louis Bailleau 55ae908018 Update all packages dependencies in project root (#863)
* Update `svgo` and `svgson` version and fix some tests

* Update eslint-related packages and fix all linter errors

* Update all rollup-related packages version

* Update all rollup-related packages (part 2)

* Update the rest of package which need to be updated

* Fix unwanted comment

* Fix unwanted comment (again)
2022-11-07 22:29:19 +01:00

22 lines
444 B
JavaScript

import fetch, { Headers } from 'node-fetch';
const githubApi = async (endpoint) => {
const headers = new Headers();
const username = 'ericfennis';
const password = process.env.GITHUB_API_KEY;
headers.set(
'Authorization',
`Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`,
);
const res = await fetch(endpoint, {
method: 'GET',
headers,
});
return res.json();
};
export default githubApi;