Last active
November 5, 2018 09:52
-
-
Save qtopie/840020d800d8c6a98c217e8c0dee4d8c to your computer and use it in GitHub Desktop.
Script to get added commit ids of pull request
This file contains hidden or 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 | |
REPO_DIR=/tmp/my-git-repo | |
git clone -b $SOURCE_BRANCH $SOURCE_REPO_URL $REPO_DIR && cd $REPO_DIR || exit 1 | |
git remote add upstream $TARGET_REPO_URL && git fetch upstream $TARGET_REPO_BRANCH | |
commit_ids=$(git cherry upstream/$TARGET_REPO_BRANCH | awk '{print $2}') | |
cd - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment