Skip to content

Check if a GitHub Pull Request is in a (most likely) mergeable state

License

Notifications You must be signed in to change notification settings

kwelch-eb/is-mergeable

 
 

Repository files navigation

is-mergeable

Check if a GitHub Pull Request is in a (most likely) mergeable state

Install

npm install --global is-mergeable

Usage

GITHUB_API_TOKEN="$TOKEN" is-mergeable \
  --owner jamiebuilds \
  --repo is-mergeable \
  --pull-request 14 \
  --min-reviews 1
  --check ci-tests

# [ Open ] Updating Documentation (jamiebuilds/is-mergeable#14)
# @jamiebuilds wants to merge 1 commit into `master` from `update-docs`
# https://github.com/jamiebuilds/is-mergeable/pull/14
#
#   ✓ Open
#   ✓ Mergeable
#   ✓ Rebaseable
#   ✗ Reviews: (0 approved, 1 requested changes, 1 pending)
#     ✗ @user1 requested changes
#     • @user2 pending reviewer
#   ✓ Checks: (1 successes, 1 failures, 0 pending)
#     ✓ ci-tests success
#     ✗ ci-build failure
#
#  ✗ jamiebuilds/is-mergeable#14 is not ready to be merged.

Note: GITHUB_API_TOKEN needs (at least) read privileges of your repo and have the repo scope.

About

Check if a GitHub Pull Request is in a (most likely) mergeable state

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 72.0%
  • TypeScript 28.0%