@tomsd/github-repo
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

@tomsd/github-repo

It's a utility for GitHub.
See github-repo-package.netlify.app for details.

installation

npm install @tomsd/github-repo

usage

import GitHubRepo class.

import { GitHubRepo } froom "@tomsd/github-repo";

create an instance

const repo = new GitHubRepo(
  GITHUB_TOKEN,
  OWNER,
  REPO
);

get branches

await repo.getBranches();

get tags

await repo.getTags();

get branch sha

await repo.getBranchSha("main");

get branch tree

await repo getBranchTree("main");

get file content

await repo.getFileContent("path/to/file");

create a tag

await repo.createTag("my-tag", "main");

/@tomsd/github-repo/

    Package Sidebar

    Install

    npm i @tomsd/github-repo

    Weekly Downloads

    0

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    19.9 kB

    Total Files

    8

    Last publish

    Collaborators

    • tomsd