jira: Fix JSON post requests for create and edit commands.
This commit is contained in:
parent
91135fca09
commit
91b570aca8
|
@ -3,10 +3,9 @@
|
||||||
"api_url": "https://example.atlassian.net/rest/api/2/issue",
|
"api_url": "https://example.atlassian.net/rest/api/2/issue",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Authorization": "Basic ZXhhbXBsZUBleGFtcGxlLmNvbTpxd2VydHkhMTIz",
|
"Authorization": "Basic ZXhhbXBsZUBleGFtcGxlLmNvbTpxd2VydHkhMTIz"
|
||||||
"Content-type": "application/json"
|
|
||||||
},
|
},
|
||||||
"data": {
|
"json": {
|
||||||
"fields": {
|
"fields": {
|
||||||
"summary": "Testing",
|
"summary": "Testing",
|
||||||
"project": {
|
"project": {
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
"api_url": "https://example.atlassian.net/rest/api/2/issue",
|
"api_url": "https://example.atlassian.net/rest/api/2/issue",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Authorization": "Basic ZXhhbXBsZUBleGFtcGxlLmNvbTpxd2VydHkhMTIz",
|
"Authorization": "Basic ZXhhbXBsZUBleGFtcGxlLmNvbTpxd2VydHkhMTIz"
|
||||||
"Content-type": "application/json"
|
|
||||||
},
|
},
|
||||||
"data": {
|
"json": {
|
||||||
"fields": {
|
"fields": {
|
||||||
"summary": "Testing",
|
"summary": "Testing",
|
||||||
"project": {
|
"project": {
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
"api_url": "https://example.atlassian.net/rest/api/2/issue/TEST-16",
|
"api_url": "https://example.atlassian.net/rest/api/2/issue/TEST-16",
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Authorization": "Basic ZXhhbXBsZUBleGFtcGxlLmNvbTpxd2VydHkhMTIz",
|
"Authorization": "Basic ZXhhbXBsZUBleGFtcGxlLmNvbTpxd2VydHkhMTIz"
|
||||||
"Content-type": "application/json"
|
|
||||||
},
|
},
|
||||||
"data": {
|
"json": {
|
||||||
"fields": {
|
"fields": {
|
||||||
"description": "description"
|
"description": "description"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,9 @@
|
||||||
"api_url": "https://example.atlassian.net/rest/api/2/issue/TEST-13",
|
"api_url": "https://example.atlassian.net/rest/api/2/issue/TEST-13",
|
||||||
"method": "PUT",
|
"method": "PUT",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Authorization": "Basic ZXhhbXBsZUBleGFtcGxlLmNvbTpxd2VydHkhMTIz",
|
"Authorization": "Basic ZXhhbXBsZUBleGFtcGxlLmNvbTpxd2VydHkhMTIz"
|
||||||
"Content-type": "application/json"
|
|
||||||
},
|
},
|
||||||
"data": {
|
"json": {
|
||||||
"fields": {
|
"fields": {
|
||||||
"summary": "Change the summary",
|
"summary": "Change the summary",
|
||||||
"project": {
|
"project": {
|
||||||
|
|
|
@ -177,8 +177,8 @@ class JiraHandler(object):
|
||||||
elif create_match:
|
elif create_match:
|
||||||
jira_response = requests.post(
|
jira_response = requests.post(
|
||||||
self.domain_with_protocol + '/rest/api/2/issue',
|
self.domain_with_protocol + '/rest/api/2/issue',
|
||||||
headers={'Authorization': self.auth, 'Content-type': 'application/json'},
|
headers={'Authorization': self.auth},
|
||||||
data=make_create_json(create_match.group('summary'),
|
json=make_create_json(create_match.group('summary'),
|
||||||
create_match.group('project_key'),
|
create_match.group('project_key'),
|
||||||
create_match.group('type_name'),
|
create_match.group('type_name'),
|
||||||
create_match.group('description'),
|
create_match.group('description'),
|
||||||
|
@ -202,8 +202,8 @@ class JiraHandler(object):
|
||||||
|
|
||||||
jira_response = requests.put(
|
jira_response = requests.put(
|
||||||
self.domain_with_protocol + '/rest/api/2/issue/' + key,
|
self.domain_with_protocol + '/rest/api/2/issue/' + key,
|
||||||
headers={'Authorization': self.auth, 'Content-type': 'application/json'},
|
headers={'Authorization': self.auth},
|
||||||
data=make_edit_json(edit_match.group('summary'),
|
json=make_edit_json(edit_match.group('summary'),
|
||||||
edit_match.group('project_key'),
|
edit_match.group('project_key'),
|
||||||
edit_match.group('type_name'),
|
edit_match.group('type_name'),
|
||||||
edit_match.group('description'),
|
edit_match.group('description'),
|
||||||
|
|
Loading…
Reference in a new issue