Skip to content
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 src/pages/builds/create-edit/BuildsCreateEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function BuildsCreateEditPage({
const { data: codeRepos, isLoading: isLoadingCodeRepos } = useGetTeamAplCodeReposQuery({ teamId })

const { data: repoBranches, isLoading: isLoadingRepoBranches } = useGetRepoBranchesQuery(
{ codeRepoName: repoName, teamId },
{ codeRepositoryName: repoName, teamId },
{ skip: !repoName },
)

Expand Down
11 changes: 4 additions & 7 deletions src/redux/otomiApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,7 @@ const injectedRtkApi = api.injectEndpoints({
query: () => ({ url: `/v1/settingsInfo` }),
}),
getRepoBranches: build.query<GetRepoBranchesApiResponse, GetRepoBranchesApiArg>({
query: (queryArg) => ({
url: `/v1/repoBranches`,
params: { codeRepoName: queryArg.codeRepoName, teamId: queryArg.teamId },
}),
query: (queryArg) => ({ url: `/v2/teams/${queryArg.teamId}/coderepos/${queryArg.codeRepositoryName}/branches` }),
}),
testRepoConnect: build.query<TestRepoConnectApiResponse, TestRepoConnectApiArg>({
query: (queryArg) => ({
Expand Down Expand Up @@ -6286,10 +6283,10 @@ export type GetSettingsInfoApiResponse = /** status 200 The request is successfu
export type GetSettingsInfoApiArg = void
export type GetRepoBranchesApiResponse = /** status 200 The request is successful. */ string[]
export type GetRepoBranchesApiArg = {
/** ID of team */
teamId: string
/** Name of the code repository */
codeRepoName?: string
/** Id of the team */
teamId?: string
codeRepositoryName: string
}
export type TestRepoConnectApiResponse = /** status 200 The request is successful. */ {
url?: string
Expand Down