commit 521e3b0a2c11c80e9f3a1bbc6e23e51a1495d269 Author: Thomas Constans Date: Wed Aug 5 11:05:23 2026 +0200 creation de ticket via api ok diff --git a/giteacli.sh b/giteacli.sh new file mode 100644 index 0000000..5fcbf1b --- /dev/null +++ b/giteacli.sh @@ -0,0 +1,22 @@ +#! /bin/bash + +set -e +set -u +set -o pipefail + + +configFile=~/.gitapi + +test -r $configFile || { + echo "gimme a $configFile with username, password and serverUrl correctly set" + exit 1 +} + +source $configFile + +url=${server}/api/v1/ + +#curl -H "Authorization: Bearer ${token}" "${url}/repos/tom/Support/issues" -d '{"state": "close"}' -H 'Content-Type: application/json' -X GET +curl -H "Authorization: Bearer ${token}" "${url}/repos/tom/Support/issues" -X POST -d '{"title": "test"}' -H 'Content-Type: application/json' + +[ $? -eq 0 ] && { echo issue created ; } \ No newline at end of file