1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-01 13:47:27 +02:00

fix: move update approvers after cr change state (#10490)

This commit is contained in:
David Leek 2025-08-12 09:16:07 +02:00 committed by GitHub
parent 105962c5c3
commit f94801ab45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,6 +82,11 @@ export const EnvironmentChangeRequest: FC<{
const sendToReview = async (project: string) => {
setDisabled(true);
try {
await changeState(project, environmentChangeRequest.id, 'Draft', {
state: 'In review',
comment: commentText,
});
if (reviewers && reviewers.length > 0) {
await updateRequestedApprovers(
project,
@ -89,11 +94,6 @@ export const EnvironmentChangeRequest: FC<{
reviewers.map((reviewer) => reviewer.id),
);
}
await changeState(project, environmentChangeRequest.id, 'Draft', {
state: 'In review',
comment: commentText,
});
} catch (e) {
setDisabled(false);
}