github-app-installation-token
Version:
npm/script and binary 📦 to get a token from a GitHub App
15 lines (11 loc) • 384 B
text/typescript
import fs from 'fs';
import { promisify } from 'util';
import { logger } from './debug';
const debug = logger('READ_FILE');
const readFile = promisify(fs.readFile);
export const readContent = async (filePath: string): Promise<string> => {
debug('reading...', filePath);
const rawContent = await readFile(filePath);
const content = rawContent.toString();
return content;
};