@@ -281,8 +281,8 @@ func getIngressClassFromUserSelect(ingressClassNames []string) (string, error) {
281281 return result , nil
282282}
283283
284- // ensureGitToken gets the runtime token from the user (if !silent), and verifys it witht he provider (if available)
285- func ensureGitToken (cmd * cobra.Command , gitProvider cfgit.Provider , cloneOpts * apgit.CloneOptions ) error {
284+ // ensureGitRuntimeToken gets the runtime token from the user (if !silent), and verifys it with he provider (if available)
285+ func ensureGitRuntimeToken (cmd * cobra.Command , gitProvider cfgit.Provider , cloneOpts * apgit.CloneOptions ) error {
286286 ctx := cmd .Context ()
287287 errMessage := "Value stored in environment variable GIT_TOKEN is invalid; enter a valid runtime token: %w"
288288 if cloneOpts .Auth .Password == "" && ! store .Get ().Silent {
@@ -294,7 +294,7 @@ func ensureGitToken(cmd *cobra.Command, gitProvider cfgit.Provider, cloneOpts *a
294294 }
295295
296296 if gitProvider != nil {
297- err := gitProvider .VerifyToken (ctx , cfgit . RuntimeToken , cloneOpts .Auth .Password )
297+ err := gitProvider .VerifyRuntimeToken (ctx , cloneOpts .Auth .Password )
298298 if err != nil {
299299 // in case when we get invalid value from env variable TOKEN we clean
300300 cloneOpts .Auth .Password = ""
@@ -307,8 +307,8 @@ func ensureGitToken(cmd *cobra.Command, gitProvider cfgit.Provider, cloneOpts *a
307307 return nil
308308}
309309
310- // ensureGitPAT verifys the user's Personal Access Token (if it is different from the Runtime Token)
311- func ensureGitPAT (ctx context.Context , opts * RuntimeInstallOptions ) error {
310+ // ensureGitUserToken verifys the user's Personal Access Token (if it is different from the Runtime Token)
311+ func ensureGitUserToken (ctx context.Context , opts * RuntimeInstallOptions ) error {
312312 if opts .GitIntegrationRegistrationOpts .Token == "" {
313313 opts .GitIntegrationRegistrationOpts .Token = opts .InsCloneOpts .Auth .Password
314314 currentUser , err := cfConfig .NewClient ().Users ().GetCurrent (ctx )
@@ -321,7 +321,7 @@ func ensureGitPAT(ctx context.Context, opts *RuntimeInstallOptions) error {
321321 }
322322
323323 if opts .gitProvider != nil {
324- return opts .gitProvider .VerifyToken (ctx , cfgit . PersonalToken , opts .InsCloneOpts . Auth . Password )
324+ return opts .gitProvider .VerifyUserToken (ctx , opts .GitIntegrationRegistrationOpts . Token )
325325 }
326326
327327 return nil
@@ -566,7 +566,7 @@ func checkIngressHostWithInsecure(ingress string) bool {
566566 customTransport := http .DefaultTransport .(* http.Transport ).Clone ()
567567 customTransport .TLSClientConfig = & tls.Config {InsecureSkipVerify : true }
568568 httpClient .Transport = customTransport
569- req , err := http .NewRequest ("GET" , ingress , nil )
569+ req , err := http .NewRequest (http . MethodGet , ingress , nil )
570570 if err != nil {
571571 return false
572572 }
0 commit comments