Skip to content

Commit

Permalink
Add back the test-pr script referenced in the docs (#2892)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnovak authored Dec 20, 2019
1 parent cc1d371 commit f38860b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions contrib/admin/test-pr
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

# test-pr: submit a PR from an external contributor for Gitlab testing

set -e

# Check arguments
if [[ "${#}" -ne 3 ]] ; then
printf >&2 "test-pr: submit a PR from an external contributor for Gitlab testing\n\n"
printf >&2 "\tusage: test-pr GH_USER SOURCE_BRANCH DEST_BRANCH\n\n"
printf >&2 "\texample: test-pr arostamianfar defaultcaching issues/2586-allow-enabling-caching\n\n"
exit 1
fi

# Parse arguments
GH_USER="${1}"
shift
SOURCE_BRANCH="${1}"
shift
DEST_BRANCH="${1}"
shift

echo "Fetch ${SOURCE_BRANCH} from ${GH_USER}"
git fetch "[email protected]:${GH_USER}/toil.git" "${SOURCE_BRANCH}"
echo "Push to Toil ${DEST_BRANCH}"
git push [email protected]:DataBiosphere/toil.git "FETCH_HEAD:refs/heads/${DEST_BRANCH}"

0 comments on commit f38860b

Please sign in to comment.