aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorMathieu Suen <mathieu.suen@sonarsource.com>2023-01-04 14:20:53 +0100
committersonartech <sonartech@sonarsource.com>2023-01-11 20:02:58 +0000
commit406c4700025ff907d4e212f8de5b3c0c53f71fa7 (patch)
treea6508b09fc2dc61e7a25e929822eb530d7ab9400 /server/sonar-web
parent4955c9ec4f08234d1bce4cb8f57b90d8e3085b41 (diff)
downloadsonarqube-406c4700025ff907d4e212f8de5b3c0c53f71fa7.tar.gz
sonarqube-406c4700025ff907d4e212f8de5b3c0c53f71fa7.zip
SONAR-17779 Update branch when application settings change
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx4
-rw-r--r--server/sonar-web/src/main/js/types/extension.ts1
2 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx
index 83ccdfcc598..f6d1ecde96d 100644
--- a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx
+++ b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx
@@ -25,7 +25,7 @@ import Extension from './Extension';
export default function ProjectAdminPageExtension() {
const { extensionKey, pluginKey } = useParams();
- const { component } = React.useContext(ComponentContext);
+ const { component, onBranchesChange } = React.useContext(ComponentContext);
const extension =
component &&
@@ -35,7 +35,7 @@ export default function ProjectAdminPageExtension() {
);
return extension ? (
- <Extension extension={extension} options={{ component }} />
+ <Extension extension={extension} options={{ component, onBranchesChange }} />
) : (
<NotFound withContainer={false} />
);
diff --git a/server/sonar-web/src/main/js/types/extension.ts b/server/sonar-web/src/main/js/types/extension.ts
index e94a693473e..68f444a69ac 100644
--- a/server/sonar-web/src/main/js/types/extension.ts
+++ b/server/sonar-web/src/main/js/types/extension.ts
@@ -41,6 +41,7 @@ export interface ExtensionStartMethodParameter {
appState: AppState;
el: HTMLElement | undefined | null;
component?: Component;
+ onBranchesChange?: (updateBranches?: boolean, updatePRs?: boolean) => void;
currentUser: CurrentUser;
intl: IntlShape;
location: Location;