From 6d284fda72d75743dd38ad1afbeb9f0425ce5574 Mon Sep 17 00:00:00 2001 From: mand1nga Date: Sat, 2 Apr 2011 17:41:15 -0300 Subject: [PATCH] Added small script for submitting issues --- misc/tools/redmine-create-issue.sh | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 misc/tools/redmine-create-issue.sh 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 + -- 2.39.2