You need to know exact `baseRefOid` so you could show correct diff.
`baseRefName` is not enough sometimes because branch from which PR was
forked might have changes already.
Example usage:
```
gh pr view --json headRefName,headRefOid,number,baseRefName,baseRefOid,reviewDecision
```
Found with
rg '(^ | \t|\t )' -g '*.go' -g '!*_test.go'
Mixed indent exceptions:
- wrapped long list items with extra 2-space indent
- code snippets using space indent
- commented code lines having "\t*// \t+" prefix
The "Author" struct was too overloaded in different types of queries that treat struct fields in incompatible ways. This change defines a simpler CommentAuthor struct for use in comments until we can figure out how to query `... on User` information for comments too.
If the base branch has no minimum approval requirements, show "N Approved"
reviews. Otherwise, show "N/X Approved".
Co-authored-by: Mislav Marohnić <mislav@github.com>
The GraphQL query for review didn't use to request the `TotalCount`
field, but that field was checked before rendering the conversation
thread in `pr view --comments`. This fixes rendering the conversation
thread when a PR only has reviews but no ordinary comments.
- Supports passing a PR as argument, not just issues
- Makes it non-fatal when project cards were not able to load
- Cleans up legacy method for fetching issues
- `issue comment` no longer fetches all issue fields and thus avoids the
problem when loading failed due to token not having access to projects
- `issue comment` now accepts either issue or pull number as argument.
This avoids loading authorship information for git commits, since it
relies on a GraphQL API that wasn't available before GHE v3.0. The
authorship information wasn't necessary for the merge operation anyway;
just loading the last commit OID was.
The `--json` flag accepts a list of GraphQL fields to query for and
output in JSON format. To get the list of available flags, run the
command with a blank value for `--json`. Additional `--jq` and
`--template` flags are available just like in `gh api`.