From: mand1nga Date: Sat, 2 Apr 2011 20:41:15 +0000 (-0300) Subject: Added small script for submitting issues X-Git-Tag: xonotic-v0.5.0~108 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6d284fda72d75743dd38ad1afbeb9f0425ce5574;p=xonotic%2Fxonotic.git Added small script for submitting issues --- diff --git a/misc/tools/redmine-create-issue.sh b/misc/tools/redmine-create-issue.sh new file mode 100755 index 00000000..e1724d99 --- /dev/null +++ b/misc/tools/redmine-create-issue.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Begin config + +STATUS_ID=${STATUS_ID:-1} +PROJECT_ID=${PROJECT_ID:-8} +TRACKER_ID=${TRACKER_ID:-4} +PRIORITY_ID=${PRIORITY_ID:-4} +REDMINE_URL=${REDMINE_URL:-"http://dev.xonotic.org"} + +# End config + +if [ "$#" -ne "4" ]; +then + echo "Usage: $0 " + exit; +fi; + +USER="$1" +PASS="$2" +SUBJECT="$3" +DESCRIPTION=$(echo "$4" | sed -e 's//\>/g') + +cat > CONTENTS < + + ${STATUS_ID} + ${TRACKER_ID} + ${PROJECT_ID} + ${PRIORITY_ID} + ${SUBJECT} + ${DESCRIPTION} + + +EOF + +curl -X POST -H "Content-Type:application/xml" --data "@CONTENTS" -u "${USER}:${PASS}" "${REDMINE_URL}/issues.xml" > /dev/null + +rm CONTENTS +