Skip to content

Commit

Permalink
fix: close Git Ops modal after successful pull (#38454)
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] and mohanarpit committed Jan 10, 2025
1 parent ca26549 commit 8faf828
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/client/src/git/sagas/pullSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { PullInitPayload } from "git/store/actions/pullActions";
import { gitArtifactActions } from "git/store/gitArtifactSlice";
import type { GitArtifactPayloadAction } from "git/store/types";
import { selectCurrentBranch } from "git/store/selectors/gitArtifactSelectors";
import { GitOpsTab } from "git/constants/enums";

// internal dependencies
import { validateResponse } from "sagas/ErrorSagas";
Expand All @@ -27,6 +28,15 @@ export default function* pullSaga(
if (response && isValidResponse) {
yield put(gitArtifactActions.pullSuccess({ artifactDef }));

// Close the modal after successful pull
yield put(
gitArtifactActions.toggleOpsModal({
artifactDef,
open: false,
tab: GitOpsTab.Deploy, // Default tab when reopening
}),
);

const currentBasePageId: string = yield select(getCurrentBasePageId);
const currentBranch: string = yield select(
selectCurrentBranch,
Expand Down

0 comments on commit 8faf828

Please sign in to comment.