gh: Backport changes from gh master

Hey @jingweno 

Since I've merged jingweno/gh master branch into hub project, these are the changes you did to jingweno/gh master in the meantime: https://github.com/jingweno/gh/compare/16fbeef...f324a83

Do you think some of them are worth cherry-picking into "gh" branch?