Skip to content

Commit

Permalink
git-pw: Make it possible to delete url/summary of test results
Browse files Browse the repository at this point in the history
$ git pw post-result $series_id success --url none

will remove the URL. Same story for the summary.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
  • Loading branch information
Damien Lespiau committed Dec 6, 2015
1 parent 02abbda commit cddf436
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-pw/git-pw
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class Patchwork(object):
absolute_url = self.api_base + url
credentials = (self.user.username, self.user.password)

r = requests.post(absolute_url, data=data, auth=credentials)
r = requests.post(absolute_url, json=data, auth=credentials)
if r.status_code < 200 or r.status_code >= 300:
e = HttpError(r.status_code)
e.set_response(r)
Expand Down Expand Up @@ -409,8 +409,12 @@ class GitPatchwork(object):
'state': self.cmd.state,
}
if self.cmd.url:
if self.cmd.url in ('none', 'null'):
self.cmd.url = None
data['url'] = self.cmd.url
if self.cmd.summary:
if self.cmd.summary in ('none', 'null'):
self.cmd.summary = None
data['summary'] = self.cmd.summary
if self.cmd.summary_from_file:
try:
Expand Down

0 comments on commit cddf436

Please sign in to comment.