mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-23 19:59:24 +01:00
* add pnpm * make it work * fix comamnds in package.jsons * move some scripts to modules * workflow fixes * test workflow * test #2 * minor fix * update lockflite * create workflows * update workflow * Add copy license command * Fix build * update workflows * update contributions.md * migrate site directory to pnpm * Fix peer dependencies when install * fix types in lucide-angular * fix testing
23 lines
504 B
JavaScript
23 lines
504 B
JavaScript
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
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;
|