Skip to content

Instantly share code, notes, and snippets.

@jamesmacaulay
Created January 27, 2011 16:34
Show Gist options
  • Save jamesmacaulay/798748 to your computer and use it in GitHub Desktop.
Save jamesmacaulay/798748 to your computer and use it in GitHub Desktop.
rietveld code review upload.py patch to open issue in browser after upload
--- codereview
+++ (clipboard)
@@ -1665,6 +1665,12 @@
vcs.UploadBaseFiles(issue, rpc_server, patches, patchset, options, files)
if options.send_mail:
rpc_server.Send("/" + issue + "/mail", payload="")
+
+ if response_body.startswith("Issue created.") or\
+ response_body.startswith("Issue updated."):
+ url = msg[msg.rfind("http"):]
+ os.system("open " + url)
+
return issue, patchset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment