Unverified Commit 564fb7da authored by trilinos-autotester's avatar trilinos-autotester Committed by GitHub
Browse files

Merge Pull Request #5108 from trilinos/Trilinos/jhu-40dccd1a

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: MueLu: upgrade auto PR script
PR Author: jhux2
parents 2b9c4fe7 40dccd1a
......@@ -7,18 +7,21 @@ tokenfile=~/.githubOAuth/token
TMPFILE=/tmp/.ac$$
USAGE="Usage: `basename $0` [-hfrbl] \"PR title\""
OPTDESCR="\n -h -- help\n -f -- fork [${fork}]\n -r -- repository [${repo}]\n -b -- branch [${mainBranch}\n -l -- label [label_name]\n -e -- (r)eviewer [reviewer_name]"
USAGE="Usage: `basename $0` [-hfrbles] \"PR title\""
OPTDESCR="\n -h -- help\n -f -- fork [${fork}]\n -r -- repository [${repo}]\n -b -- branch [${mainBranch}]\n -l -- label [github package label]\n -e
-- (r)eviewer [github handle]\n -s -- summary [first comment, ideally should reference github issue]"
EXAMPLE_USAGE="Example: makepr.sh -l \"pkg: MueLu\" -l \"pkg: Xpetra\" -e \"jhux2\" -e \"csiefer2\" -s \"Fixes issue #666\" \"MueLu: implement nifty feature\""
labels="\"AT: AUTOMERGE\""
reviewers=""
# Parse command line options.
while getopts hvf:r:b:l:e: OPT; do
while getopts hvf:r:b:l:e:s: OPT; do
case "$OPT" in
h)
echo -e $USAGE
echo -e $OPTDESCR
echo -e "\n$EXAMPLE_USAGE"
exit 0
;;
v)
......@@ -44,6 +47,9 @@ while getopts hvf:r:b:l:e: OPT; do
reviewers="$reviewers,\"$OPTARG\""
fi
;;
s)
MESSAGE_STRING=$OPTARG
;;
\?)
# getopts issues an error message
echo $USAGE >&2
......@@ -84,7 +90,9 @@ REMOTE=$USER-$SHA
# Push this branch to remote with a new name
git push origin $CBRANCH:$REMOTE
MESSAGE_STRING="Auto-PR for SHA $SHA"
if [[ -z $MESSAGE_STRING ]]; then
MESSAGE_STRING="Auto-PR for SHA $SHA"
fi
# Generate a new pull request
TITLE_STRING="$*"
......@@ -131,4 +139,4 @@ else
fi
rm -f $TMPFILE
\ No newline at end of file
rm -f $TMPFILE
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment