-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add back the test-pr script referenced in the docs (#2892)
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
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
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}" | ||
|