diff --git a/plugins/github-release-manager/src/GitHubReleaseManager.tsx b/plugins/github-release-manager/src/GitHubReleaseManager.tsx
index 1160016a66..64b7ebb028 100644
--- a/plugins/github-release-manager/src/GitHubReleaseManager.tsx
+++ b/plugins/github-release-manager/src/GitHubReleaseManager.tsx
@@ -32,7 +32,7 @@ import { InfoCardPlus } from './components/InfoCardPlus';
import { isProjectValid } from './helpers/isProjectValid';
import { PluginApiClientContext } from './contexts/PluginApiClientContext';
import { ProjectContext, Project } from './contexts/ProjectContext';
-import { RepoDetailsForm } from './cards/projectForm/RepoDetailsForm';
+import { RepoDetailsForm } from './cards/RepoDetailsForm/RepoDetailsForm';
import { useQueryHandler } from './hooks/useQueryHandler';
import { useStyles } from './styles/styles';
diff --git a/plugins/github-release-manager/src/api/PluginApiClient.ts b/plugins/github-release-manager/src/api/PluginApiClient.ts
index 9c6b840989..276951b598 100644
--- a/plugins/github-release-manager/src/api/PluginApiClient.ts
+++ b/plugins/github-release-manager/src/api/PluginApiClient.ts
@@ -20,7 +20,7 @@ import { readGitHubIntegrationConfigs } from '@backstage/integration';
import { CalverTagParts } from '../helpers/tagParts/getCalverTagParts';
import { DISABLE_CACHE } from '../constants/constants';
-import { getRcGitHubInfo } from '../cards/createRc/getRcGitHubInfo';
+import { getRcGitHubInfo } from '../cards/CreateRc/helpers/getRcGitHubInfo';
import { Project } from '../contexts/ProjectContext';
import { SemverTagParts } from '../helpers/tagParts/getSemverTagParts';
diff --git a/plugins/github-release-manager/src/cards/Cards.tsx b/plugins/github-release-manager/src/cards/Cards.tsx
index 5773717cd8..5fbb7fb1f7 100644
--- a/plugins/github-release-manager/src/cards/Cards.tsx
+++ b/plugins/github-release-manager/src/cards/Cards.tsx
@@ -15,18 +15,17 @@
*/
import React, { useState } from 'react';
-import { useAsync } from 'react-use';
import { ErrorBoundary } from '@backstage/core';
import { Alert } from '@material-ui/lab';
import { CenteredCircularProgress } from '../components/CenteredCircularProgress';
-import { CreateRc } from './createRc/CreateRc';
-import { getGitHubBatchInfo } from '../sideEffects/getGitHubBatchInfo';
+import { CreateRc } from './CreateRc/CreateRc';
import { GitHubReleaseManagerProps } from '../GitHubReleaseManager';
-import { Info } from './info/Info';
-import { Patch } from './patchRc/Patch';
-import { PromoteRc } from './promoteRc/PromoteRc';
+import { Info } from './Info/Info';
+import { Patch } from './Patch/Patch';
+import { PromoteReleaseCandidate } from './PromoteReleaseCandidate/PromoteRc';
import { RefetchContext } from '../contexts/RefetchContext';
+import { useGetGitHubBatchInfo } from '../hooks/useGetGitHubBatchInfo';
import { usePluginApiClientContext } from '../contexts/PluginApiClientContext';
import { useProjectContext } from '../contexts/ProjectContext';
import { useVersioningStrategyMatchesRepoTags } from '../hooks/useVersioningStrategyMatchesRepoTags';
@@ -39,10 +38,11 @@ export function Cards({
const pluginApiClient = usePluginApiClientContext();
const project = useProjectContext();
const [refetchTrigger, setRefetchTrigger] = useState(0);
- const gitHubBatchInfo = useAsync(
- getGitHubBatchInfo({ project, pluginApiClient }),
- [project, refetchTrigger],
- );
+ const { gitHubBatchInfo } = useGetGitHubBatchInfo({
+ pluginApiClient,
+ project,
+ refetchTrigger,
+ });
const { versioningStrategyMatches } = useVersioningStrategyMatchesRepoTags({
latestReleaseTagName: gitHubBatchInfo.value?.latestRelease?.tagName,
@@ -111,7 +111,7 @@ export function Cards({
)}
{!components?.promoteRc?.omit && (
-
diff --git a/plugins/github-release-manager/src/cards/patchRc/Patch.test.tsx b/plugins/github-release-manager/src/cards/Patch/Patch.test.tsx
similarity index 100%
rename from plugins/github-release-manager/src/cards/patchRc/Patch.test.tsx
rename to plugins/github-release-manager/src/cards/Patch/Patch.test.tsx
diff --git a/plugins/github-release-manager/src/cards/patchRc/Patch.tsx b/plugins/github-release-manager/src/cards/Patch/Patch.tsx
similarity index 100%
rename from plugins/github-release-manager/src/cards/patchRc/Patch.tsx
rename to plugins/github-release-manager/src/cards/Patch/Patch.tsx
diff --git a/plugins/github-release-manager/src/cards/patchRc/PatchBody.test.tsx b/plugins/github-release-manager/src/cards/Patch/PatchBody.test.tsx
similarity index 98%
rename from plugins/github-release-manager/src/cards/patchRc/PatchBody.test.tsx
rename to plugins/github-release-manager/src/cards/Patch/PatchBody.test.tsx
index f9a8babb5d..2d8025bd3f 100644
--- a/plugins/github-release-manager/src/cards/patchRc/PatchBody.test.tsx
+++ b/plugins/github-release-manager/src/cards/Patch/PatchBody.test.tsx
@@ -21,8 +21,8 @@ import {
mockApiClient,
mockBumpedTag,
mockCalverProject,
- mockReleaseCandidateCalver,
mockReleaseBranch,
+ mockReleaseCandidateCalver,
mockReleaseVersionCalver,
mockTagParts,
} from '../../test-helpers/test-helpers';
@@ -33,7 +33,7 @@ jest.mock('../../contexts/PluginApiClientContext', () => ({
jest.mock('../../contexts/ProjectContext', () => ({
useProjectContext: jest.fn(() => mockCalverProject),
}));
-jest.mock('./sideEffects/usePatch', () => ({
+jest.mock('./hooks/usePatch', () => ({
usePatch: () => ({
run: jest.fn(),
responseSteps: [],
diff --git a/plugins/github-release-manager/src/cards/patchRc/PatchBody.tsx b/plugins/github-release-manager/src/cards/Patch/PatchBody.tsx
similarity index 94%
rename from plugins/github-release-manager/src/cards/patchRc/PatchBody.tsx
rename to plugins/github-release-manager/src/cards/Patch/PatchBody.tsx
index ce0b3acd1c..6f112cf013 100644
--- a/plugins/github-release-manager/src/cards/patchRc/PatchBody.tsx
+++ b/plugins/github-release-manager/src/cards/Patch/PatchBody.tsx
@@ -40,12 +40,12 @@ import {
import { CalverTagParts } from '../../helpers/tagParts/getCalverTagParts';
import { CenteredCircularProgress } from '../../components/CenteredCircularProgress';
import { ComponentConfigPatch } from '../../types/types';
-import { Dialog } from '../../components/Dialog';
import { Differ } from '../../components/Differ';
import { GitHubReleaseManagerError } from '../../errors/GitHubReleaseManagerError';
+import { ResponseStepDialog } from '../../components/ResponseStepDialog/ResponseStepDialog';
import { SemverTagParts } from '../../helpers/tagParts/getSemverTagParts';
import { TEST_IDS } from '../../test-helpers/test-ids';
-import { usePatch } from './sideEffects/usePatch';
+import { usePatch } from './hooks/usePatch';
import { usePluginApiClientContext } from '../../contexts/PluginApiClientContext';
import { useProjectContext } from '../../contexts/ProjectContext';
import { useStyles } from '../../styles/styles';
@@ -91,7 +91,7 @@ export const PatchBody = ({
};
});
- const { run, responseSteps, progress } = usePatch({
+ const { progress, responseSteps, run, runInvoked } = usePatch({
bumpedTag,
latestRelease,
pluginApiClient,
@@ -101,7 +101,7 @@ export const PatchBody = ({
});
if (responseSteps.length > 0) {
return (
-