From cf60199f3fbff5a918cdaedf62a97d1b3a50792d Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 9 Oct 2019 13:15:03 -0700 Subject: [PATCH] Add version --- api/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/client.go b/api/client.go index 3ca9cc25d..b58786366 100644 --- a/api/client.go +++ b/api/client.go @@ -9,6 +9,8 @@ import ( "os" "os/user" "regexp" + + "github.com/github/gh-cli/version" ) type graphQLResponse struct { @@ -56,6 +58,7 @@ func graphQL(query string, variables map[string]string, v interface{}) error { } req.Header.Set("Authorization", "token "+getToken()) req.Header.Set("Content-Type", "application/json; charset=utf-8") + req.Header.Set("User-Agent", "GitHub CLI "+version.Version) debugRequest(req, string(reqBody))