creation de ticket via api ok
This commit is contained in:
+22
@@ -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 ; }
|
||||||
Reference in New Issue
Block a user