mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 23:57:43 +01:00
* 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)
22 lines
444 B
JavaScript
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;
|