curl --request POST \
--url 'https://bankofloyal.atlassian.net/rest/api/2/issue' \
--user [email protected]:$JIRA_TOKEN \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"fields": {
"project": {
"key": "'$JIRA_PROJECT'"
},
"parent": {
"key": "'$PARENT_ISSUE_KEY'"
},
"components": [
{
"id": "'$COMPONENT_ID'"
}
],
"summary": "Directories with migration changes: '"${DIR_JOINED}"'",
"description": "Name of models: '"${MODEL_NAMES}"'",
"issuetype": {
"name": "Sub-task"
}
}
}'
我想要一张使用 cURL 生成的票证,但收到“JSON 解析错误”。在调试时,我发现问题出在正文的摘要和描述中,错误地使用了变量DIR_CHANGED
和MODEL_NAME
。你能建议一些其他方法吗?