Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

アプリ作成画面で選択可能なリポジトリ一覧を正しく取得 #924

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-protoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
go-version-file: ./go.mod
- uses: arduino/setup-protoc@v3
with:
version: "25.3"
version: "27.1"
- name: Install proto tools
run: make init-protoc-tools
- name: Generate code
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROTOC_VERSION := 27.0
PROTOC_VERSION := 27.1
TBLS_VERSION := 1.75.0

GO_REPO_ROOT_PACKAGE := "github.com/traPtitech/neoshowcase"
Expand Down
5 changes: 3 additions & 2 deletions api/proto/neoshowcase/protobuf/gateway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,10 @@ message CreateRepositoryRequest {
message GetRepositoriesRequest {
enum Scope {
MINE = 0;
PUBLIC = 1;
CREATABLE = 1;
PUBLIC = 2;
// admin only
ALL = 2;
ALL = 3;
}
Scope scope = 1;
}
Expand Down
18 changes: 12 additions & 6 deletions dashboard/src/api/neoshowcase/protobuf/gateway_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2429,22 +2429,28 @@ export enum GetRepositoriesRequest_Scope {
MINE = 0,

/**
* @generated from enum value: PUBLIC = 1;
* @generated from enum value: CREATABLE = 1;
*/
PUBLIC = 1,
CREATABLE = 1,

/**
* @generated from enum value: PUBLIC = 2;
*/
PUBLIC = 2,

/**
* admin only
*
* @generated from enum value: ALL = 2;
* @generated from enum value: ALL = 3;
*/
ALL = 2,
ALL = 3,
}
// Retrieve enum metadata with: proto3.getEnumType(GetRepositoriesRequest_Scope)
proto3.util.setEnumType(GetRepositoriesRequest_Scope, "neoshowcase.protobuf.GetRepositoriesRequest.Scope", [
{ no: 0, name: "MINE" },
{ no: 1, name: "PUBLIC" },
{ no: 2, name: "ALL" },
{ no: 1, name: "CREATABLE" },
{ no: 2, name: "PUBLIC" },
{ no: 3, name: "ALL" },
]);

/**
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/pages/apps/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const RepositoryStep: Component<{
}> = (props) => {
const [repos] = createResource(() =>
client.getRepositories({
scope: GetRepositoriesRequest_Scope.MINE,
scope: GetRepositoriesRequest_Scope.CREATABLE,
}),
)
const [apps] = createResource(() => client.getApplications({ scope: GetApplicationsRequest_Scope.ALL }))
Expand Down
9 changes: 5 additions & 4 deletions pkg/domain/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@ type EnvironmentRepository interface {
}

type GetRepositoryCondition struct {
IDs optional.Of[[]string]
URLs optional.Of[[]string]
PublicOrOwnedBy optional.Of[string]
UserID optional.Of[string]
IDs optional.Of[[]string]
URLs optional.Of[[]string]
CreatableOrOwnedBy optional.Of[string]
PublicOrOwnedBy optional.Of[string]
UserID optional.Of[string]
}

type UpdateRepositoryArgs struct {
Expand Down
48 changes: 24 additions & 24 deletions pkg/infrastructure/grpc/pb/controller.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading