🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@studyportals/github

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@studyportals/github

Ease the process of interacting with GitHub (commenting on a Pull Request)

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
2
Created
Source

GitHub

This package aims to ease the process of interacting with GitHub.

NPM version NPM license NPM downloads

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

Build Status

This package can be compiled and tested locally.

  • npm install - Install the dependencies
  • npm test - Runs the test suite (will lint and compile first)
  • npm compile - Compiles the entire project
  • npm 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

Keywords

github

FAQs

Package last updated on 20 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts