Created
July 11, 2019 20:51
-
-
Save miguelmota/cd9cb75fefd9ab9dc913b3ada8ae26d1 to your computer and use it in GitHub Desktop.
Git (hub) github pull-request merge git extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: hub-pr-merge <PR-NUMBER> | |
# | |
# Cause a pull request to be merged into its respective base branch. | |
# If a script errors, force the script to fail immediately. | |
set -e | |
ID=$1 | |
shift 1 | |
# https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button | |
hub api -XPUT "repos/{owner}/{repo}/pulls/$ID/merge" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment