Files
rfc.vac.dev/scrapper/github.mjs
Filip Pajic 8164e1de65 chore: Markdown fetching script refactor (#1)
* Added .env.example

* env config loading refactored

* utility file system functions for reading and writing

* vac to docusaurus converter functions extracted

* github api service extracted

* refactor the scrapping script

* removed unused imports

* updated directories to sync
2024-04-19 14:24:43 +02:00

13 lines
300 B
JavaScript

import { GITHUB_TOKEN } from './config.mjs'
import axios from "axios";
export async function fetchFromGitHub(url, callback) {
const response = await axios.get(url, {
headers: {
'User-Agent': 'Node.js',
'Authorization': `token ${GITHUB_TOKEN}`
}
});
return response.data;
}