chore: re-instate status call for protected branches in git connected apps (#40880)
This commit is contained in:
parent
8f35929b19
commit
ddad013ace
|
|
@ -7,7 +7,6 @@ import type { GitArtifactPayloadAction } from "git/store/types";
|
||||||
import { call, put, select } from "redux-saga/effects";
|
import { call, put, select } from "redux-saga/effects";
|
||||||
import { validateResponse } from "sagas/ErrorSagas";
|
import { validateResponse } from "sagas/ErrorSagas";
|
||||||
import handleApiErrors from "./helpers/handleApiErrors";
|
import handleApiErrors from "./helpers/handleApiErrors";
|
||||||
import { selectProtectedMode } from "git/store/selectors/gitArtifactSelectors";
|
|
||||||
|
|
||||||
export default function* fetchStatusSaga(
|
export default function* fetchStatusSaga(
|
||||||
action: GitArtifactPayloadAction<FetchStatusInitPayload>,
|
action: GitArtifactPayloadAction<FetchStatusInitPayload>,
|
||||||
|
|
@ -21,22 +20,6 @@ export default function* fetchStatusSaga(
|
||||||
selectGitApiContractsEnabled,
|
selectGitApiContractsEnabled,
|
||||||
);
|
);
|
||||||
|
|
||||||
const isCurrentBranchProtected: boolean = yield select(
|
|
||||||
selectProtectedMode,
|
|
||||||
artifactDef,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (isCurrentBranchProtected) {
|
|
||||||
// Skip status check for protected branches and set empty status
|
|
||||||
yield put(
|
|
||||||
gitArtifactActions.resetGitStatus({
|
|
||||||
artifactDef,
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
response = yield call(
|
response = yield call(
|
||||||
fetchStatusRequest,
|
fetchStatusRequest,
|
||||||
artifactDef.artifactType,
|
artifactDef.artifactType,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user