Skip to content

NPM Package to get status of github pull requests

Notifications You must be signed in to change notification settings

sladyn98/hawk-eye-npm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hawk-fetch

This npm package fetches the status checks for a particular repository and a given pull request number

Usage

npm save -i hawk-fetch

Options

You need to provide options:

a) hawk.getStatusData : Fetches all data for a given pull request

Usage

const hawk = require('hawk-fetch')
   (async () => {
    console.log(await hawk.getStatusData({
      token  : '',
      owner  : 'jenkinsci',
      repo   : 'custom-distribution-service',
      pr     : '162'
    }));
})();

b) hawk.isMergeable : Checks if a PR has any merge conflicts and whether it can be merged

Usage

hawk.isMergeable({
      token  : '',
      owner  : 'jenkinsci',
      repo   : 'custom-distribution-service',
      pr     : '162'
  }).then(res => console.log(res))

b) hawk.isPendingReview : Checks if a PR has pending reviews or is approved

Usage

hawk.isPendingReview({
      token  : '',
      owner  : 'jenkinsci',
      repo   : 'custom-distribution-service',
      pr     : '162'
  }).then(res => console.log(res))

About

NPM Package to get status of github pull requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published