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

0.0.3 • Public • Published

juiz/github package

npm (scoped)

Gihutb API Clients

How to

for rest client(v3 api)

import { RestClient } from "@teitei-tk/juiz-github/clients";

const client = new RestClient({
  token: your_github_token
});

// create new pull request
// eg.
// url: https://github.com/teitei-tk/juiz/number
// title: new-feature
// base:master head:develop
client.createPullRequest({
  owner: "teitei-tk",
  repo: "juiz",
  title: "new-feature",
  head: "develop",
  base: "master"
});

for GraphQLClient(v4 api)

import { GraphQLClient } from "@teitei-tk/juiz-github/clients";

const client = new GraphQLClient({
  token: your_github_token
});

const result = await client.request(`{
  repository(owner: "teitei-tk", name: "juiz") {
    name
    owner {
      login
    }
    description
  }
}`);

console.log(result);
/*
{
  "data": {
    "repository": {
      "name": "juiz",
      "owner": {
        "login": "teitei-tk"
      },
      "description": "Manage Github PullRequest Code reviewer assign"
    }
  }
}
*/

Readme

Keywords

none

Package Sidebar

Install

npm i @juiz/github

Weekly Downloads

0

Version

0.0.3

License

Apache-2.0

Unpacked Size

6.63 kB

Total Files

15

Last publish

Collaborators

  • teitei-tk