@@ -419,10 +419,13 @@ func (r Repository) GetEntity() (GithubEntity, error) {
419419 return GithubEntity {}, fmt .Errorf ("repository has no ID" )
420420 }
421421 return GithubEntity {
422- ID : r .ID ,
423- EntityType : GithubEntityTypeRepository ,
424- Owner : r .Owner ,
425- Name : r .Name ,
422+ ID : r .ID ,
423+ EntityType : GithubEntityTypeRepository ,
424+ Owner : r .Owner ,
425+ Name : r .Name ,
426+ PoolBalancerType : r .PoolBalancerType ,
427+ Credentials : r .Credentials ,
428+ WebhookSecret : r .WebhookSecret ,
426429 }, nil
427430}
428431
@@ -470,10 +473,12 @@ func (o Organization) GetEntity() (GithubEntity, error) {
470473 return GithubEntity {}, fmt .Errorf ("organization has no ID" )
471474 }
472475 return GithubEntity {
473- ID : o .ID ,
474- EntityType : GithubEntityTypeOrganization ,
475- Owner : o .Name ,
476- WebhookSecret : o .WebhookSecret ,
476+ ID : o .ID ,
477+ EntityType : GithubEntityTypeOrganization ,
478+ Owner : o .Name ,
479+ WebhookSecret : o .WebhookSecret ,
480+ PoolBalancerType : o .PoolBalancerType ,
481+ Credentials : o .Credentials ,
477482 }, nil
478483}
479484
@@ -517,10 +522,12 @@ func (e Enterprise) GetEntity() (GithubEntity, error) {
517522 return GithubEntity {}, fmt .Errorf ("enterprise has no ID" )
518523 }
519524 return GithubEntity {
520- ID : e .ID ,
521- EntityType : GithubEntityTypeEnterprise ,
522- Owner : e .Name ,
523- WebhookSecret : e .WebhookSecret ,
525+ ID : e .ID ,
526+ EntityType : GithubEntityTypeEnterprise ,
527+ Owner : e .Name ,
528+ WebhookSecret : e .WebhookSecret ,
529+ PoolBalancerType : e .PoolBalancerType ,
530+ Credentials : e .Credentials ,
524531 }, nil
525532}
526533
@@ -685,11 +692,6 @@ type Provider struct {
685692// used by swagger client generated code
686693type Providers []Provider
687694
688- type UpdatePoolStateParams struct {
689- WebhookSecret string
690- InternalConfig * Internal
691- }
692-
693695type PoolManagerStatus struct {
694696 IsRunning bool `json:"running"`
695697 FailureReason string `json:"failure_reason,omitempty"`
@@ -788,15 +790,23 @@ type UpdateSystemInfoParams struct {
788790}
789791
790792type GithubEntity struct {
791- Owner string `json:"owner"`
792- Name string `json:"name"`
793- ID string `json:"id"`
794- EntityType GithubEntityType `json:"entity_type"`
795- Credentials GithubCredentials `json:"credentials"`
793+ Owner string `json:"owner"`
794+ Name string `json:"name"`
795+ ID string `json:"id"`
796+ EntityType GithubEntityType `json:"entity_type"`
797+ Credentials GithubCredentials `json:"credentials"`
798+ PoolBalancerType PoolBalancerType `json:"pool_balancing_type"`
796799
797800 WebhookSecret string `json:"-"`
798801}
799802
803+ func (g GithubEntity ) GetPoolBalancerType () PoolBalancerType {
804+ if g .PoolBalancerType == "" {
805+ return PoolBalancerTypeRoundRobin
806+ }
807+ return g .PoolBalancerType
808+ }
809+
800810func (g GithubEntity ) LabelScope () string {
801811 switch g .EntityType {
802812 case GithubEntityTypeRepository :
0 commit comments