Relax description validation

Description should not be mandatory when defining a github endpoint.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2025-02-05 20:05:55 +00:00
parent 001465d0a2
commit beafcb6316
2 changed files with 0 additions and 12 deletions

View file

@ -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 {

View file

@ -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{