Skip to content

Commit

Permalink
fix papi-server conversion and align naming of prebuild settings
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTugarev committed Sep 29, 2023
1 parent 8871b18 commit 11b6d0c
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 133 deletions.
4 changes: 2 additions & 2 deletions components/dashboard/src/service/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export function projectToProtocol(project: Project): ProtocolProject {
},
prebuilds: {
enable: project.settings?.prebuild?.enablePrebuilds,
branchStrategy: project.settings?.prebuild?.prebuildBranchStrategy as any,
branchMatchingPattern: project.settings?.prebuild?.prebuildBranchPattern,
branchStrategy: project.settings?.prebuild?.branchStrategy as any,
branchMatchingPattern: project.settings?.prebuild?.branchMatchingPattern,
prebuildInterval: project.settings?.prebuild?.prebuildInterval,
workspaceClass: project.settings?.prebuild?.workspaceClass,
},
Expand Down
2 changes: 1 addition & 1 deletion components/gitpod-protocol/go/gitpod-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2302,7 +2302,7 @@ type PrebuildSettings struct {
Enable *bool `json:"enable,omitempty"`
PrebuildInterval *int32 `json:"prebuildInterval,omitempty"`
BranchStrategy *string `json:"branchStrategy,omitempty"`
PrebuildBranchPattern *string `json:"prebuildBranchPattern,omitempty"`
BranchMatchingPattern *string `json:"branchMatchingPattern,omitempty"`
WorkspaceClass *string `json:"workspaceClass,omitempty"`
}

Expand Down
4 changes: 2 additions & 2 deletions components/public-api-server/pkg/apiv1/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ func projectSettingsToAPIResponse(s *protocol.ProjectSettings) *v1.ProjectSettin
}
if s.PrebuildSettings != nil {
settings.Prebuild.EnablePrebuilds = s.PrebuildSettings.Enable
settings.Prebuild.PrebuildBranchStrategy = s.PrebuildSettings.BranchStrategy
settings.Prebuild.PrebuildBranchPattern = s.PrebuildSettings.PrebuildBranchPattern
settings.Prebuild.BranchStrategy = s.PrebuildSettings.BranchStrategy
settings.Prebuild.BranchMatchingPattern = s.PrebuildSettings.BranchMatchingPattern
settings.Prebuild.PrebuildInterval = s.PrebuildSettings.PrebuildInterval
settings.Prebuild.WorkspaceClass = s.PrebuildSettings.WorkspaceClass
}
Expand Down
4 changes: 2 additions & 2 deletions components/public-api/gitpod/experimental/v1/projects.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ message PrebuildSettings {
reserved 4; // was prebuild_every_nth
optional bool enable_prebuilds = 5;
reserved 6; // was prebuild_default_branch_only
optional string prebuild_branch_pattern = 7;
optional string prebuild_branch_strategy = 8;
optional string branch_matching_pattern = 7;
optional string branch_strategy = 8;
optional int32 prebuild_interval = 9;
optional string workspace_class = 10;
}
Expand Down
Loading

0 comments on commit 11b6d0c

Please sign in to comment.