Merge pull request #80 from github/status-check-rollup

Strengthen PR Reviews+Checks GraphQL via `pe_mobile` feature flag
This commit is contained in:
Mislav Marohnić 2019-11-18 20:00:25 +01:00 committed by GitHub
commit b640a3027a
3 changed files with 35 additions and 68 deletions

View file

@ -378,6 +378,8 @@ func printPrs(prs ...api.PullRequest) {
if reviews.ChangesRequested {
fmt.Printf(" - %s", utils.Red("changes requested"))
} else if reviews.ReviewRequired {
fmt.Printf(" - %s", utils.Yellow("review required"))
} else if reviews.Approved {
fmt.Printf(" - %s", utils.Green("approved"))
}

View file

@ -75,6 +75,7 @@ var apiClientForContext = func(ctx context.Context) (*api.Client, error) {
// antiope-preview: Checks
// shadow-cat-preview: Draft pull requests
api.AddHeader("Accept", "application/vnd.github.antiope-preview+json, application/vnd.github.shadow-cat-preview"),
api.AddHeader("GraphQL-Features", "pe_mobile"),
}
if verbose := os.Getenv("DEBUG"); verbose != "" {
opts = append(opts, api.VerboseLog(os.Stderr))