cherry-pick-pr 343 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. #
  3. # Cherry-pick a PR into the release branch
  4. #
  5. set -e
  6. set -o pipefail
  7. function usage() {
  8. >&2 cat << EOM
  9. Cherry-pick commits from a github pull request.
  10. Usage:
  11. $0 <github PR number>
  12. EOM
  13. exit 1
  14. }
  15. [ -n "$1" ] || usage
  16. REPO=docker/compose
  17. GITHUB=https://github.com/$REPO/pull
  18. PR=$1
  19. url="$GITHUB/$PR"
  20. hub am -3 $url