creation de ticket via api ok

This commit is contained in:
tom
2026-08-05 11:05:23 +02:00
commit 521e3b0a2c
+22
View File
@@ -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 ; }