From 87bd2cb1b8edb4cb3b8efb58981a0e86a31a685e Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 17 Sep 2025 15:08:01 +0200 Subject: [PATCH] client: improve user agent --- client/graphql.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/graphql.go b/client/graphql.go index 6fabeadf085bb30aea7356e893ae0bc85856ea45..c148d7579d786310f79c3229920b2f8def8551d0 100644 --- a/client/graphql.go +++ b/client/graphql.go @@ -127,7 +127,9 @@ func Do(ctx context.Context, username string, svc string, return err } req.Header.Add("Content-Type", contentType) - req.Header.Add("User-Agent", "SourceHut core-go (https://git.sr.ht/~sircmpwn/core-go)") + req.Header.Add("User-Agent", + fmt.Sprintf("%s -- SourceHut core-go (https://git.sr.ht/~sircmpwn/core-go)", + config.ServiceName(ctx))) auth := InternalAuth{ Name: username, ClientID: config.ServiceName(ctx),