gh has been released.
In this article, I would like to introduce 3 things you should know when you use it.
gh pr has diff command that shows us differences between a new PR and master. However, it only has a color option, so all diffs are listed on the same window which is hard to review if the change has many lines. So I think right now,
gh pr diff is for a small change.
The following is a diff when I added a new markdown file.
$ gh pr diff
gh pr has
review command that allows us to review a PR and give
request change which is very useful. However, we can not approve of our own PR.
This functionality totally makes sense to team development.
$ gh pr review 1 ? What kind of review do you want to give? Approve ? Review body <Received> ? Submit? Yes failed to create review: Can not approve your own pull request
nano as default editor.
I don't use
nano, but use
vim on Terminal. Also, use VSCode.
I'm using VScode for
gh because VScode has a preview function for markdown. So, it is helpful to edit a new PR's body when I open a new PR.
$ gh config set editor "code --wait" # vim $ gh config set editor vim