mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-21 01:09:23 +01:00
Add Changelog generator
This commit is contained in:
22
scripts/githubApi.js
Normal file
22
scripts/githubApi.js
Normal file
@@ -0,0 +1,22 @@
|
||||
// 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;
|
||||
Reference in New Issue
Block a user