1.0.2 • Published 6 years ago
@studyportals/github v1.0.2
GitHub
This package aims to ease the process of interacting with GitHub.
Interface:
export interface IGitHub {
getComments(owner: string, repository: string, issueNumber?: string): Promise<IGitHubComment[]>;
deleteComment(owner: string, repository: string, commentId: string): Promise<any>;
postComment(owner: string, repository: string, issueNumber: string, body: string): Promise<IGitHubComment>;
}
Installation:
npm install --save @studyportals/github
Example:
TypeScript
import {GitHub} from "@studyportals/github";
const GH = new GitHub(process.env.GITHUB_TOKEN);
return GH.postComment("studyportals", "github", "1", "Comment description")
.then((comment) => { });
Node
const github = require("@studyportals/github");
const GH = new github.GitHub(process.env.GITHUB_TOKEN);
return GH.postComment("studyportals", "github", "1", "Comment description")
.then((comment) => { });
Development
This package can be compiled and tested locally.
npm install
- Install the dependenciesnpm test
- Runs the test suite (will lint and compile first)npm compile
- Compiles the entire projectnpm run setup-hooks
- Install Git hooks. This will add a pre-commit hook to ensure code quality.npm run watch
- Watch the project and compile on the fly.
Please have a look at package.json scripts section.
Publishing NPM package
This package is automatically published by TravisCI for every commit on master.
# Draft a new version
# @see: https://docs.npmjs.com/cli/version
# @see: https://semver.org/
npm version [<newversion> | major | minor | patch | prerelease ]
# Push the commit and tags
git push --follow-tags
1.0.2
6 years ago
1.0.2-alpha.2
6 years ago
1.0.2-alpha.1
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago
1.0.0-alpha.15
6 years ago
1.0.0-alpha.14
6 years ago
1.0.0-alpha.12
6 years ago
1.0.0-alpha.11
6 years ago
1.0.0-alpha.10
6 years ago
1.0.0-alpha.9
6 years ago
1.0.0-alpha.8
6 years ago
1.0.0-alpha.7
6 years ago
1.0.0-alpha.6
6 years ago
1.0.0-alpha.4
6 years ago
1.0.0-alpha.3
6 years ago
1.0.0-alpha.2
6 years ago
1.0.0-alpha.1
6 years ago
1.0.0-alpha.0
6 years ago