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
4 changes: 2 additions & 2 deletions app/client/src/git/hooks/useCommit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ export default function useCommit() {
const commitState = useArtifactSelector(selectCommitState);

const commit = useCallback(
(commitMessage: string) => {
(message: string) => {
if (artifactDef && artifactId) {
dispatch(
gitArtifactActions.commitInit({
artifactId,
artifactDef,
commitMessage,
message,
doPush: true,
}),
);
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/git/requests/commitRequest.types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { ApiResponse } from "api/types";

export interface CommitRequestParams {
commitMessage: string;
message: string;
doPush: boolean;
}

Expand Down
4 changes: 3 additions & 1 deletion app/client/src/git/requests/fetchProtectedBranchesRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ async function fetchProtectedBranchesRequestNew(
artifactType: GitArtifactType,
baseArtifactId: string,
): AxiosPromise<FetchProtectedBranchesResponse> {
return Api.get(`${GIT_BASE_URL}/${artifactType}/${baseArtifactId}/protected`);
return Api.get(
`${GIT_BASE_URL}/${artifactType}/${baseArtifactId}/protected-branches`,
);
}

export default async function fetchProtectedBranchesRequest(
Expand Down
4 changes: 1 addition & 3 deletions app/client/src/git/requests/gitImportRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ async function gitImportRequestNew(
workspaceId: string,
params: GitImportRequestParams,
): AxiosPromise<GitImportResponse> {
return Api.post(`${GIT_BASE_URL}/artifacts/import`, params, {
params: { workspaceId },
});
return Api.post(`${GIT_BASE_URL}/artifacts/import`, params, { workspaceId });
}

export default async function gitImportRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function updateProtectedBranchesRequestNew(
params: UpdateProtectedBranchesRequestParams,
): AxiosPromise<UpdateProtectedBranchesResponse> {
return Api.post(
`${GIT_BASE_URL}/${artifactType}/${baseArtifactId}/protected`,
`${GIT_BASE_URL}/${artifactType}/${baseArtifactId}/protected-branches`,
params,
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/git/sagas/commitSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function* commitSaga(

try {
const params: CommitRequestParams = {
commitMessage: action.payload.commitMessage,
message: action.payload.message,
doPush: action.payload.doPush,
};
const isGitApiContractsEnabled: boolean = yield select(
Expand Down
Loading