From d1b630f110db52fe047a6933c80de15cba2ecfe2 Mon Sep 17 00:00:00 2001 From: Barrett Clark Date: Fri, 15 Jul 2022 11:38:46 -0500 Subject: [PATCH] Add Name to the Oauth Client Payload Fixes #461 --- oauth_client.go | 1 + oauth_client_integration_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/oauth_client.go b/oauth_client.go index e0034417c..06b474436 100644 --- a/oauth_client.go +++ b/oauth_client.go @@ -73,6 +73,7 @@ type OAuthClient struct { HTTPURL string `jsonapi:"attr,http-url"` Key string `jsonapi:"attr,key"` RSAPublicKey string `jsonapi:"attr,rsa-public-key"` + Name string `jsonapi:"attr,name"` Secret string `jsonapi:"attr,secret"` ServiceProvider ServiceProviderType `jsonapi:"attr,service-provider"` ServiceProviderName string `jsonapi:"attr,service-provider-display-name"` diff --git a/oauth_client_integration_test.go b/oauth_client_integration_test.go index aad201f01..d2b35ae47 100644 --- a/oauth_client_integration_test.go +++ b/oauth_client_integration_test.go @@ -109,6 +109,7 @@ func TestOAuthClientsCreate(t *testing.T) { oc, err := client.OAuthClients.Create(ctx, orgTest.Name, options) require.NoError(t, err) assert.NotEmpty(t, oc.ID) + assert.Empty(t, oc.Name) assert.Equal(t, "https://api.github.com", oc.APIURL) assert.Equal(t, "https://github.com", oc.HTTPURL) assert.Equal(t, 1, len(oc.OAuthTokens))