@wix/evalforge-github-client
v0.39.0
Published
GitHub Contents API client for fetching skill directories
Downloads
4,318
Maintainers
Keywords
Readme
@wix/evalforge-github-client
A lightweight client for the GitHub Contents API, used to fetch skill directories from GitHub repositories.
Usage
import { fetchSkillFolder, fetchGitHubFolder, validateGitHubSource } from '@wix/evalforge-github-client';
// Fetch a skill folder from a GitHub repo
const files = await fetchSkillFolder({
owner: 'my-org',
repo: 'my-repo',
path: 'skills/my-skill',
ref: 'main',
token: process.env.GITHUB_TOKEN,
});
// Validate a GitHub source URL
const isValid = validateGitHubSource(sourceUrl);Exports
| Function | Description |
|----------|-------------|
| fetchSkillFolder | Fetch all files in a skill directory from GitHub |
| fetchGitHubFolder | Generic folder fetch from the GitHub Contents API |
| validateGitHubSource | Validate a GitHub source URL/path |
Scripts
yarn build # Build CJS + ESM + type declarations
yarn lint # Run ESLint
yarn clean # Remove build artifacts