Add ability to specify github enpoints for creds

The GitHub credentials section now allows setting some API endpoints
that point the github client and the runner setup script to the propper
URLs. This allows us to use garm with an on-prem github enterprise server.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2022-10-12 21:45:07 +00:00
parent a55f852161
commit f40420bfb6
No known key found for this signature in database
GPG key ID: 7D073DCC2C074CB5
11 changed files with 196 additions and 45 deletions

View file

@ -63,10 +63,10 @@ func init() {
func formatGithubCredentials(creds []params.GithubCredentials) {
t := table.NewWriter()
header := table.Row{"Name", "Description"}
header := table.Row{"Name", "Description", "Base URL", "API URL", "Upload URL"}
t.AppendHeader(header)
for _, val := range creds {
t.AppendRow(table.Row{val.Name, val.Description})
t.AppendRow(table.Row{val.Name, val.Description, val.BaseURL, val.APIBaseURL, val.UploadBaseURL})
t.AppendSeparator()
}
fmt.Println(t.Render())