Now also my requests seem to be getting suck when its running the update 
command, the subprocess just never returns an exit code for python to get 
the output. Is there something im doing to cause that?

set +ex

BRANCH_NAME=$1
REVIEWERS=$2
REPO=$3
rb_user=$4
rb_password=$5
action=$6
base_branch=$7

#added these options
submit_as=$8
summary=$9
jira_id=$10
desc=$11

echo "Jira Link: $jira_id"
echo "Desc: $desc"
echo "Repo: $repo"
echo "Submit as: $submit_as"
echo "Summary $summary"
echo "Branch name $BRANCH_NAME"


cd $REPO
git checkout $BRANCH_NAME

if [ "$action" == "post" ]; then

    rbt post --repository=$REPO \
                   --tracking-branch="origin/$BRANCH_NAME" \
                   --parent="origin/$base_branch" \
                   --branch="$BRANCH_NAME" \
                   --guess-fields=auto \
                   --target-groups=$REVIEWERS \
                   --publish \
                   --server="http://reviews.domain.com"; \
                   --username="$rb_user" \
                   --password=$rb_password \
                   --submit-as="$submit_as" \
                   --bugs-closed="$jira_id" \
                   --description="$summary" \
                   -d
else
    yes | rbt post --debug --update --repository=$REPO \
                   --tracking-branch="origin/$BRANCH_NAME" \
                   --parent="origin/$base_branch" \
                   --branch="$BRANCH_NAME" \
                   --guess-fields=auto \
                   --target-groups=$REVIEWERS \
                   --publish \
                   --server="http://reviews.domain.com"; \
                   --username="$rb_user" \
                   --password=$rb_password \
                   --submit-as="$submit_as" \
                   --bugs-closed="$jira_id" \
                   --description="$summary" >> updates
fi

cd ../
exit 0

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to