From beafcb6316a3278a59b064fa33723ce69195c319 Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Wed, 5 Feb 2025 20:05:55 +0000 Subject: [PATCH] Relax description validation Description should not be mandatory when defining a github endpoint. Signed-off-by: Gabriel Adrian Samfira --- config/config.go | 3 --- config/config_test.go | 9 --------- 2 files changed, 12 deletions(-) diff --git a/config/config.go b/config/config.go index 04d26ada..33d9283c 100644 --- a/config/config.go +++ b/config/config.go @@ -358,9 +358,6 @@ func (g *Github) Validate() error { if g.Name == "" { return fmt.Errorf("missing credentials name") } - if g.Description == "" { - return fmt.Errorf("missing credentials description") - } if g.APIBaseURL != "" { if _, err := url.ParseRequestURI(g.APIBaseURL); err != nil { diff --git a/config/config_test.go b/config/config_test.go index b94956fc..a517fede 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -667,15 +667,6 @@ func TestGithubConfig(t *testing.T) { }, errString: "missing credentials name", }, - { - name: "Description is empty", - cfg: Github{ - Name: "dummy_creds", - Description: "", - OAuth2Token: "bogus", - }, - errString: "missing credentials description", - }, { name: "OAuth token is set in the PAT section", cfg: Github{