diff --git a/CHANGELOG.md b/CHANGELOG.md index fb3cb8c07d..d4e859c4ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased ### Added - Tags now have date information attached ([#1305](https://github.com/scm-manager/scm-manager/pull/1305)) +- Add support for scroll anchors in url hash of diff page ([#1304](https://github.com/scm-manager/scm-manager/pull/1304)) ### Fixed +- Redirection to requested page after login in anonymous mode + +## [2.4.1] - 2020-09-01 +### Added +- Add "sonia.scm.restart-migration.wait" to set wait in milliseconds before restarting scm-server after migration ([#1308](https://github.com/scm-manager/scm-manager/pull/1308)) + +### Fixed +- Fix detection of markdown files for files having content does not start with '#' ([#1306](https://github.com/scm-manager/scm-manager/pull/1306)) - Fix broken markdown rendering ([#1303](https://github.com/scm-manager/scm-manager/pull/1303)) - JWT token timeout is now handled properly ([#1297](https://github.com/scm-manager/scm-manager/pull/1297)) - Fix text-overflow in danger zone ([#1298](https://github.com/scm-manager/scm-manager/pull/1298)) - Fix plugin installation error if previously a plugin was installed with the same dependency which is still pending. ([#1300](https://github.com/scm-manager/scm-manager/pull/1300)) +- Fix layout overflow on changesets with multiple tags ([#1314](https://github.com/scm-manager/scm-manager/pull/1314)) +- Make checkbox accessible from keyboard ([#1309](https://github.com/scm-manager/scm-manager/pull/1309)) +- Fix logging of large stacktrace for unknown language ([#1313](https://github.com/scm-manager/scm-manager/pull/1313)) +- Fix incorrect word breaking behaviour in markdown ([#1317](https://github.com/scm-manager/scm-manager/pull/1317)) +- Remove obsolete revision encoding on sources ([#1315](https://github.com/scm-manager/scm-manager/pull/1315)) +- Map generic JaxRS 'web application exceptions' to appropriate response instead of "internal server error" ([#1318](https://github.com/scm-manager/scm-manager/pull/1312)) + ## [2.4.0] - 2020-08-14 ### Added @@ -284,3 +300,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [2.3.0]: https://www.scm-manager.org/download/2.3.0 [2.3.1]: https://www.scm-manager.org/download/2.3.1 [2.4.0]: https://www.scm-manager.org/download/2.4.0 +[2.4.1]: https://www.scm-manager.org/download/2.4.1 diff --git a/lerna.json b/lerna.json index c8dcc2f397..4db07d9ee9 100644 --- a/lerna.json +++ b/lerna.json @@ -5,5 +5,5 @@ ], "npmClient": "yarn", "useWorkspaces": true, - "version": "2.4.0" + "version": "2.4.1" } diff --git a/scm-core/src/main/java/sonia/scm/web/filter/AuthenticationFilter.java b/scm-core/src/main/java/sonia/scm/web/filter/AuthenticationFilter.java index a6514465fd..30e8df9fe7 100644 --- a/scm-core/src/main/java/sonia/scm/web/filter/AuthenticationFilter.java +++ b/scm-core/src/main/java/sonia/scm/web/filter/AuthenticationFilter.java @@ -166,6 +166,11 @@ public class AuthenticationFilter extends HttpFilter { HttpUtil.sendUnauthorized(request, response, configuration.getRealmDescription()); } + protected void handleTokenExpiredException(HttpServletRequest request, HttpServletResponse response, + FilterChain chain, TokenExpiredException tokenExpiredException) throws IOException, ServletException { + throw tokenExpiredException; + } + /** * Iterates all {@link WebTokenGenerator} and creates an * {@link AuthenticationToken} from the given request. @@ -211,7 +216,7 @@ public class AuthenticationFilter extends HttpFilter { processChain(request, response, chain, subject); } catch (TokenExpiredException ex) { // Rethrow to be caught by TokenExpiredFilter - throw ex; + handleTokenExpiredException(request, response, chain, ex); } catch (AuthenticationException ex) { logger.warn("authentication failed", ex); handleUnauthorized(request, response, chain); diff --git a/scm-core/src/main/java/sonia/scm/web/filter/HttpProtocolServletAuthenticationFilterBase.java b/scm-core/src/main/java/sonia/scm/web/filter/HttpProtocolServletAuthenticationFilterBase.java index 08f845740c..e6716f0013 100644 --- a/scm-core/src/main/java/sonia/scm/web/filter/HttpProtocolServletAuthenticationFilterBase.java +++ b/scm-core/src/main/java/sonia/scm/web/filter/HttpProtocolServletAuthenticationFilterBase.java @@ -25,6 +25,7 @@ package sonia.scm.web.filter; import sonia.scm.config.ScmConfiguration; +import sonia.scm.security.TokenExpiredException; import sonia.scm.util.HttpUtil; import sonia.scm.web.UserAgent; import sonia.scm.web.UserAgentParser; @@ -59,4 +60,15 @@ public class HttpProtocolServletAuthenticationFilterBase extends AuthenticationF HttpUtil.sendUnauthorized(request, response); } } + + @Override + protected void handleTokenExpiredException(HttpServletRequest request, HttpServletResponse response, FilterChain chain, TokenExpiredException tokenExpiredException) throws IOException, ServletException { + UserAgent userAgent = userAgentParser.parse(request); + if (userAgent.isBrowser()) { + // we can proceed the filter chain because the HttpProtocolServlet will render the ui if the client is a browser + chain.doFilter(request, response); + } else { + super.handleTokenExpiredException(request, response, chain, tokenExpiredException); + } + } } diff --git a/scm-core/src/test/java/sonia/scm/web/filter/HttpProtocolServletAuthenticationFilterBaseTest.java b/scm-core/src/test/java/sonia/scm/web/filter/HttpProtocolServletAuthenticationFilterBaseTest.java index daa2ad448b..2c49458547 100644 --- a/scm-core/src/test/java/sonia/scm/web/filter/HttpProtocolServletAuthenticationFilterBaseTest.java +++ b/scm-core/src/test/java/sonia/scm/web/filter/HttpProtocolServletAuthenticationFilterBaseTest.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.web.filter; import org.junit.jupiter.api.BeforeEach; @@ -30,6 +30,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import sonia.scm.config.ScmConfiguration; +import sonia.scm.security.TokenExpiredException; import sonia.scm.util.HttpUtil; import sonia.scm.web.UserAgent; import sonia.scm.web.UserAgentParser; @@ -43,6 +44,7 @@ import java.io.IOException; import java.util.Collections; import java.util.Set; +import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -93,4 +95,23 @@ class HttpProtocolServletAuthenticationFilterBaseTest { verify(filterChain).doFilter(request, response); } + @Test + void shouldIgnoreTokenExpiredExceptionForBrowserCall() throws IOException, ServletException { + when(userAgentParser.parse(request)).thenReturn(browser); + + authenticationFilter.handleTokenExpiredException(request, response, filterChain, new TokenExpiredException("Nothing ever expired so much")); + + verify(filterChain).doFilter(request, response); + } + + @Test + void shouldRethrowTokenExpiredExceptionForApiCall() { + when(userAgentParser.parse(request)).thenReturn(nonBrowser); + + final TokenExpiredException tokenExpiredException = new TokenExpiredException("Nothing ever expired so much"); + + assertThrows(TokenExpiredException.class, + () -> authenticationFilter.handleTokenExpiredException(request, response, filterChain, tokenExpiredException)); + } + } diff --git a/scm-plugins/scm-git-plugin/package.json b/scm-plugins/scm-git-plugin/package.json index 1f54c19fb2..0a789bde38 100644 --- a/scm-plugins/scm-git-plugin/package.json +++ b/scm-plugins/scm-git-plugin/package.json @@ -1,7 +1,7 @@ { "name": "@scm-manager/scm-git-plugin", "private": true, - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "main": "./src/main/js/index.ts", "scripts": { @@ -20,6 +20,6 @@ }, "prettier": "@scm-manager/prettier-config", "dependencies": { - "@scm-manager/ui-plugins": "^2.4.0" + "@scm-manager/ui-plugins": "^2.4.1" } } diff --git a/scm-plugins/scm-hg-plugin/package.json b/scm-plugins/scm-hg-plugin/package.json index 9217810a50..c67c73bd4b 100644 --- a/scm-plugins/scm-hg-plugin/package.json +++ b/scm-plugins/scm-hg-plugin/package.json @@ -1,7 +1,7 @@ { "name": "@scm-manager/scm-hg-plugin", "private": true, - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "main": "./src/main/js/index.ts", "scripts": { @@ -19,6 +19,6 @@ }, "prettier": "@scm-manager/prettier-config", "dependencies": { - "@scm-manager/ui-plugins": "^2.4.0" + "@scm-manager/ui-plugins": "^2.4.1" } } diff --git a/scm-plugins/scm-legacy-plugin/package.json b/scm-plugins/scm-legacy-plugin/package.json index 7c127ec21c..e5d158a9fb 100644 --- a/scm-plugins/scm-legacy-plugin/package.json +++ b/scm-plugins/scm-legacy-plugin/package.json @@ -1,7 +1,7 @@ { "name": "@scm-manager/scm-legacy-plugin", "private": true, - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "main": "./src/main/js/index.tsx", "scripts": { @@ -19,6 +19,6 @@ }, "prettier": "@scm-manager/prettier-config", "dependencies": { - "@scm-manager/ui-plugins": "^2.4.0" + "@scm-manager/ui-plugins": "^2.4.1" } } diff --git a/scm-plugins/scm-svn-plugin/package.json b/scm-plugins/scm-svn-plugin/package.json index 03ae37d3dc..978e2296d1 100644 --- a/scm-plugins/scm-svn-plugin/package.json +++ b/scm-plugins/scm-svn-plugin/package.json @@ -1,7 +1,7 @@ { "name": "@scm-manager/scm-svn-plugin", "private": true, - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "main": "./src/main/js/index.ts", "scripts": { @@ -19,6 +19,6 @@ }, "prettier": "@scm-manager/prettier-config", "dependencies": { - "@scm-manager/ui-plugins": "^2.4.0" + "@scm-manager/ui-plugins": "^2.4.1" } } diff --git a/scm-ui/e2e-tests/package.json b/scm-ui/e2e-tests/package.json index d5348843d0..5ba065dbf4 100644 --- a/scm-ui/e2e-tests/package.json +++ b/scm-ui/e2e-tests/package.json @@ -1,6 +1,6 @@ { "name": "@scm-manager/e2e-tests", - "version": "2.4.0", + "version": "2.4.1", "description": "End to end Tests for SCM-Manager", "main": "index.js", "author": "Eduard Heimbuch ", diff --git a/scm-ui/ui-components/.storybook/config.js b/scm-ui/ui-components/.storybook/config.js index ae409e6478..af032d4054 100644 --- a/scm-ui/ui-components/.storybook/config.js +++ b/scm-ui/ui-components/.storybook/config.js @@ -29,6 +29,7 @@ import { withI18next } from "storybook-addon-i18next"; import "!style-loader!css-loader!sass-loader!../../ui-styles/src/scm.scss"; import React from "react"; import { MemoryRouter } from "react-router-dom"; +import withRedux from "./withRedux"; let i18n = i18next; @@ -70,4 +71,6 @@ addDecorator( }) ); +addDecorator(withRedux); + configure(require.context("../src", true, /\.stories\.tsx?$/), module); diff --git a/scm-ui/ui-components/.storybook/withRedux.js b/scm-ui/ui-components/.storybook/withRedux.js new file mode 100644 index 0000000000..0abc2149ca --- /dev/null +++ b/scm-ui/ui-components/.storybook/withRedux.js @@ -0,0 +1,41 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import React from "react"; +import {createStore} from "redux"; +import { Provider } from 'react-redux' + +const reducer = (state, action) => { + return state; +}; + +const withRedux = (storyFn) => { + return React.createElement(Provider, { + store: createStore(reducer, {}), + children: storyFn() + }); +} + + +export default withRedux; diff --git a/scm-ui/ui-components/package.json b/scm-ui/ui-components/package.json index 54606ae27a..f6a51262eb 100644 --- a/scm-ui/ui-components/package.json +++ b/scm-ui/ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@scm-manager/ui-components", - "version": "2.4.0", + "version": "2.4.1", "description": "UI Components for SCM-Manager and its plugins", "main": "src/index.ts", "files": [ diff --git a/scm-ui/ui-components/src/ErrorBoundary.tsx b/scm-ui/ui-components/src/ErrorBoundary.tsx index e8eda0d366..3d0144b95b 100644 --- a/scm-ui/ui-components/src/ErrorBoundary.tsx +++ b/scm-ui/ui-components/src/ErrorBoundary.tsx @@ -21,14 +21,24 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import React, { ReactNode } from "react"; +import React, { ComponentType, ReactNode } from "react"; import ErrorNotification from "./ErrorNotification"; +import { MissingLinkError } from "./errors"; +import { withContextPath } from "./urls"; +import { withRouter, RouteComponentProps } from "react-router-dom"; +import ErrorPage from "./ErrorPage"; +import { WithTranslation, withTranslation } from "react-i18next"; +import { compose } from "redux"; +import { connect } from "react-redux"; -type Props = { +type ExportedProps = { fallback?: React.ComponentType; children: ReactNode; + loginLink?: string; }; +type Props = WithTranslation & RouteComponentProps & ExportedProps; + type ErrorInfo = { componentStack: string; }; @@ -44,16 +54,44 @@ class ErrorBoundary extends React.Component { this.state = {}; } - componentDidCatch(error: Error, errorInfo: ErrorInfo) { - // Catch errors in any components below and re-render with error message - this.setState({ - error, - errorInfo - }); + componentDidUpdate(prevProps: Readonly) { + // we must reset the error if the url has changed + if (this.state.error && prevProps.location !== this.props.location) { + this.setState({ error: undefined, errorInfo: undefined }); + } } + componentDidCatch(error: Error, errorInfo: ErrorInfo) { + this.setState( + { + error, + errorInfo + }, + () => this.redirectToLogin(error) + ); + } + + redirectToLogin = (error: Error) => { + const { loginLink, location } = this.props; + if (error instanceof MissingLinkError) { + if (loginLink) { + window.location.assign(withContextPath("/login?from=" + location.pathname)); + } + } + }; + renderError = () => { + const { t } = this.props; + const { error } = this.state; + let FallbackComponent = this.props.fallback; + + if (error instanceof MissingLinkError) { + return ( + + ); + } + if (!FallbackComponent) { FallbackComponent = ErrorNotification; } @@ -69,4 +107,17 @@ class ErrorBoundary extends React.Component { return this.props.children; } } -export default ErrorBoundary; + +const mapStateToProps = (state: any) => { + const loginLink = state.indexResources?.links?.login?.href; + + return { + loginLink + }; +}; + +export default compose>( + withRouter, + withTranslation("commons"), + connect(mapStateToProps) +)(ErrorBoundary); diff --git a/scm-ui/ui-components/src/ErrorNotification.tsx b/scm-ui/ui-components/src/ErrorNotification.tsx index 00524efa4e..c43ef73119 100644 --- a/scm-ui/ui-components/src/ErrorNotification.tsx +++ b/scm-ui/ui-components/src/ErrorNotification.tsx @@ -21,16 +21,26 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import React from "react"; -import { WithTranslation, withTranslation } from "react-i18next"; +import React, { FC } from "react"; +import { useTranslation, WithTranslation, withTranslation } from "react-i18next"; import { BackendError, ForbiddenError, UnauthorizedError } from "./errors"; import Notification from "./Notification"; import BackendErrorNotification from "./BackendErrorNotification"; +import { useLocation } from "react-router-dom"; +import { withContextPath } from "./urls"; type Props = WithTranslation & { error?: Error; }; +const LoginLink: FC = () => { + const [t] = useTranslation("commons"); + const location = useLocation(); + const from = encodeURIComponent(location.pathname); + + return {t("errorNotification.loginLink")}; +}; + class ErrorNotification extends React.Component { render() { const { t, error } = this.props; @@ -40,8 +50,7 @@ class ErrorNotification extends React.Component { } else if (error instanceof UnauthorizedError) { return ( - {t("errorNotification.prefix")}: {t("errorNotification.timeout")}{" "} - {t("errorNotification.loginLink")} + {t("errorNotification.prefix")}: {t("errorNotification.timeout")} ); } else if (error instanceof ForbiddenError) { diff --git a/scm-ui/ui-components/src/ProtectedRoute.tsx b/scm-ui/ui-components/src/ProtectedRoute.tsx index b83271fdb8..c371c49892 100644 --- a/scm-ui/ui-components/src/ProtectedRoute.tsx +++ b/scm-ui/ui-components/src/ProtectedRoute.tsx @@ -22,7 +22,7 @@ * SOFTWARE. */ import React, { Component } from "react"; -import { Route, Redirect, withRouter, RouteComponentProps, RouteProps } from "react-router-dom"; +import { Redirect, Route, RouteComponentProps, RouteProps, withRouter } from "react-router-dom"; type Props = RouteComponentProps & RouteProps & { @@ -30,7 +30,16 @@ type Props = RouteComponentProps & }; class ProtectedRoute extends Component { - renderRoute = (Component: any, authenticated?: boolean) => { + constructor(props: Props) { + super(props); + this.state = { + error: undefined + }; + } + + renderRoute = (Component: any) => { + const { authenticated } = this.props; + return (routeProps: any) => { if (authenticated) { return ; @@ -50,8 +59,8 @@ class ProtectedRoute extends Component { }; render() { - const { component, authenticated, ...routeProps } = this.props; - return ; + const { component, ...routeProps } = this.props; + return ; } } diff --git a/scm-ui/ui-components/src/Tooltip.tsx b/scm-ui/ui-components/src/Tooltip.tsx index 98dce960d2..9277ad0d01 100644 --- a/scm-ui/ui-components/src/Tooltip.tsx +++ b/scm-ui/ui-components/src/Tooltip.tsx @@ -22,12 +22,12 @@ * SOFTWARE. */ import React, { ReactNode } from "react"; -import classNames from "classnames"; type Props = { message: string; className?: string; location: string; + multiline?: boolean; children: ReactNode; }; @@ -37,9 +37,17 @@ class Tooltip extends React.Component { }; render() { - const { className, message, location, children } = this.props; + const { className, message, location, multiline, children } = this.props; + let classes = `tooltip has-tooltip-${location}`; + if (multiline) { + classes += " has-tooltip-multiline"; + } + if (className) { + classes += " " + className; + } + return ( - + {children} ); diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index c725cfbb6d..a475ea15fd 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -3896,261 +3896,265 @@ exports[`Storyshots Diff Binaries 1`] = `
-
+
- - - Main.java - - - modify - -
-
+ + + Main.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 1 - - 1 - - class Main { -
- 2 - - 2 - - - public static void main(String[] args) { -
- 3 - - 3 - - + public static void main(String[] arguments) { -
- 4 - - 4 - - System.out.println("Expect nothing more to happen."); -
- 5 - - 5 - - } -
-
-
-
-
-
- + + + + + - conflict.png - - - add - -
-
-
-
+ + + 1 + + + 1 + + + class Main { + + + + + 2 + + + 2 + + + - public static void main(String[] args) { + + + + + 3 + + + 3 + + + + public static void main(String[] arguments) { + + + + + 4 + + + 4 + + + System.out.println("Expect nothing more to happen."); + + + + + 5 + + + 5 + + + } + + + +
- - - - - - -
+
+
+ + conflict.png + + + add + +
+
+
+
+
+
+
+ + + + + + +
+
@@ -4160,570 +4164,578 @@ exports[`Storyshots Diff Collapsed 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - -
-
- + + + +
+
- - - - -
-
- + + + +
+
- - - - + + + + +
-
-
- - - src/main/js/ChangeNotification.tsx - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - -
-
- + + + +
+
- - - - -
-
- + + + +
+
- - - - + + + + +
-
-
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/resources/locales/de/plugins.json + + + modify + +
+
- - - - - -
-
- + + + +
+
- - - - -
-
- + + + +
+
- - - - + + + + +
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - -
-
- + + + +
+
- - - - -
-
- + + + +
+
- - - - + + + + +
- -
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/test/java/com/cloudogu/scm/review/events/ClientTest.java + + + modify + +
+
- - - - - -
-
- + + + +
+
- - - - -
-
- + + + +
+
- - - - + + + + +
- -
- - - Main.java - - - modify - -
-
+ + + Main.java + + + modify + +
+
- - - - - -
-
- + + + +
+
- - - - -
-
- + + + +
+
- - - - + + + + +
@@ -4737,1883 +4749,1891 @@ exports[`Storyshots Diff CollapsingWithFunction 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
-
- - - - - -
-
-
-
-
-
-
-
-
-
- - - src/main/js/ChangeNotification.tsx - - - modify - -
-
-
-
- - - - - -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - + +
-
- - - - - - - - - - - - - - - + + + + + + + + + + + +
+
+
-
- + + + + +
- 2 - - 2 - - import { Link } from "@scm-manager/ui-types"; -
- 3 - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - 4 - - import { PullRequest } from "./types/PullRequest"; -
- - 5 - + - import { useTranslation } from "react-i18next"; -
- 5 - - 6 - - -
- 6 - - 7 - - type HandlerProps = { -
- 7 - - 8 - - url: string; -
+ + -
+ + modify + + +
+
+
+ + + + + +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + - - - - + 5 + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - + + + + - 17 - - + + + + - }); - - - - + + + + - 17 - - + + + - 18 - - + + + + - }, [url]); - - - - + + + + - 19 - - + + + - const { t } = useTranslation("plugins"); - - - - + + + - 18 - - + + + - 20 - - + + + - if (event) { - - - - + + + - 19 - - + + + - 21 - - + + + + - return ( - - - - + + + - 20 - - + + + - <Toast type="warning" title="New Changes"> - - - - + + + - 21 - - + + + - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> - - - - + + + - 22 - - + + + - <p>Warning: Non saved modification will be lost.</p> - - - - + + + - 22 - - + + + - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> - - - - + + + + - 23 - - + + + + - <p>{t("scm-review-plugin.changeNotification.description")}</p> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ 2 + + 2 + + import { Link } from "@scm-manager/ui-types"; +
+ 3 + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + 4 + + import { PullRequest } from "./types/PullRequest"; +
-
+ import { useTranslation } from "react-i18next"; +
+ 5 + + 6 + + +
+ 6 + + 7 + + type HandlerProps = { +
+ 7 + + 8 + + url: string; +
- 15 - - 16 - - pullRequest: setEvent -
+
+
- 16 - + 15 + + 16 + + pullRequest: setEvent +
+ 16 + + 17 + + }); +
+ 17 + + 18 + + }, [url]); +
+ + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + 20 + + if (event) { +
- + 19 + + 21 + + return ( +
+ 20 + + + <Toast type="warning" title="New Changes"> +
+ 21 + + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> +
+ 22 + + + <p>Warning: Non saved modification will be lost.</p> +
+ + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + 25 + + <ToastButtons> +
+ 24 + + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> +
- + 25 + + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> +
+ + 26 + + <ToastButton icon="redo" onClick={reload}> +
- + + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + 28 + + </ToastButton> +
- + + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
- + + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + 31 + + </ToastButton> +
- + 26 + + 32 + + </ToastButtons> +
+ 27 + + 33 + + </Toast> +
- - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - 25 - - <ToastButtons> -
- 24 - - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> -
- 25 - - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> -
- - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - 28 - - </ToastButton> -
- - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - 31 - - </ToastButton> -
- 26 - - 32 - - </ToastButtons> -
- 27 - - 33 - - </Toast> -
- 28 - - 34 - - ); -
+
+ 28 + + 34 + + ); +
+
-
-
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/resources/locales/de/plugins.json + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - + + + + + - - + + + + - 181 - - - - - - - + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 181 - + 181 + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
- "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - - 182 - + 182 + + 182 + + } +
+ 183 + + 183 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "Neue Änderungen", -
- - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Neu laden", -
- - 191 - - "ignore": "Ignorieren" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
-
-
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- + - - - - -
-
-
-
-
-
- - - - - - - - - + + - 181 - - + + + - 181 - - + + + - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - - - + + + - 182 - - + + + - 182 - - + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + - - - + - 185 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "Neue Änderungen", +
+ + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Neu laden", +
+ + 191 + + "ignore": "Ignorieren" +
+ + 192 + } -
- 183 - - 183 - +
+ 184 + + 193 + } -
- - 184 - +
+ 185 + + 194 + }, -
- +
- "changeNotification": { -
- - 186 - - "title": "New Changes", -
- - 187 - - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", -
- - 188 - - "modificationWarning": "Warning: Non saved modification will be lost.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Reload", -
- - 191 - - "ignore": "Ignore" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
+ + 186 + + + 195 + + + "permissions": { + + + + +
-
-
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - + + + + +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 181 + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
+ 182 + + 182 + + } +
+ 183 + + 183 + + } +
+ + 184 + + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "New Changes", +
+ + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
+ + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Reload", +
+ + 191 + + "ignore": "Ignore" +
+ + 192 + + } +
+ 184 + + 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
+
+
+
+
+
+ + + src/test/java/com/cloudogu/scm/review/events/ClientTest.java + + + modify + +
+
+
+
+ + + + + +
-
-
- - - Main.java - - - modify - -
-
+ + + Main.java + + + modify + +
+
- - - - - + + + + +
@@ -6627,3834 +6647,3842 @@ exports[`Storyshots Diff Default 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 1 - - 1 - - package com.cloudogu.scm.review.events; -
- 2 - - 2 - - -
- 3 - - - import com.cloudogu.scm.review.comment.service.BasicComment; -
- 4 - - - import com.cloudogu.scm.review.comment.service.BasicCommentEvent; -
- 5 - - - import com.cloudogu.scm.review.comment.service.CommentEvent; -
- 6 - - - import com.cloudogu.scm.review.comment.service.ReplyEvent; -
- 7 - - 3 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; -
- 8 - - 4 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; -
- 9 - - - import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; -
- 10 - - 5 - - import com.github.legman.Subscribe; -
- 11 - - - import lombok.Data; -
- 12 - - 6 - - import org.apache.shiro.SecurityUtils; -
- 13 - - 7 - - import org.apache.shiro.subject.PrincipalCollection; -
- 14 - - 8 - - import org.apache.shiro.subject.Subject; -
- 15 - - 9 - - import sonia.scm.EagerSingleton; -
- 16 - - - import sonia.scm.HandlerEventType; -
- 17 - - - import sonia.scm.event.HandlerEvent; -
- 18 - - 10 - - import sonia.scm.plugin.Extension; -
- 19 - - 11 - - import sonia.scm.repository.Repository; -
- 20 - - 12 - - import sonia.scm.security.SessionId; -
-
-
-
-
-
- - - src/main/js/ChangeNotification.tsx - - - modify - -
-
-
-
- - - - - -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + + + - 6 - - + + + + - - - - - - - - - - - - - - - - - + - - - - - + + - 15 - - + + + - 16 - - + + + - pullRequest: setEvent - - - - + + + - 16 - - + + + + - 17 - - + + + + - }); - - - - + + + - 17 - - + + + + - 18 - - + + + - }, [url]); - - - - + + + + - 19 - - + + + + - const { t } = useTranslation("plugins"); - - - - + + + + - 18 - - + + + + - 20 - - + + + - if (event) { - - - - + + + - 19 - - + + + + - 21 - - + + + + - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 2 - - 2 - - import { Link } from "@scm-manager/ui-types"; -
- 3 - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - 4 - - import { PullRequest } from "./types/PullRequest"; -
+
- 5 - - import { useTranslation } from "react-i18next"; -
- 5 - + 1 + + 1 + + package com.cloudogu.scm.review.events; +
+ 2 + + 2 + + +
- 6 - - 7 - - type HandlerProps = { -
- 7 - - 8 - - url: string; -
-
+ 3 +
-
+ import com.cloudogu.scm.review.comment.service.BasicComment; +
+ 4 + + + import com.cloudogu.scm.review.comment.service.BasicCommentEvent; +
+ 5 + + + import com.cloudogu.scm.review.comment.service.CommentEvent; +
+ 6 + + + import com.cloudogu.scm.review.comment.service.ReplyEvent; +
+ 7 + + 3 + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; +
+ 8 + + 4 + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; +
+ 9 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; +
+ 10 + + 5 + + import com.github.legman.Subscribe; +
+ 11 + + + import lombok.Data; +
- + 12 + + 6 + + import org.apache.shiro.SecurityUtils; +
+ 13 + + 7 + + import org.apache.shiro.subject.PrincipalCollection; +
+ 14 + + 8 + + import org.apache.shiro.subject.Subject; +
+ 15 + + 9 + + import sonia.scm.EagerSingleton; +
+ 16 + + + import sonia.scm.HandlerEventType; +
+ 17 + + + import sonia.scm.event.HandlerEvent; +
+ 18 + + 10 + + import sonia.scm.plugin.Extension; +
+ 19 + + 11 + + import sonia.scm.repository.Repository; +
- 20 - - - <Toast type="warning" title="New Changes"> -
- 21 - - - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> -
- 22 - - - <p>Warning: Non saved modification will be lost.</p> -
- - 22 - - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> -
- - 23 - - <p>{t("scm-review-plugin.changeNotification.description")}</p> -
- - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - 25 - - <ToastButtons> -
- 24 - - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> -
- 25 - - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> -
- - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - 28 - - </ToastButton> -
- - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - 31 - - </ToastButton> -
- 26 - - 32 - - </ToastButtons> -
- 27 - - 33 - - </Toast> -
- 28 - - 34 - - ); -
+ + 20 + + + 12 + + + import sonia.scm.security.SessionId; + + + + +
-
-
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 2 + + 2 + + import { Link } from "@scm-manager/ui-types"; +
+ 3 + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + 4 + + import { PullRequest } from "./types/PullRequest"; +
+ + 5 + + import { useTranslation } from "react-i18next"; +
+ 5 + + 6 + + +
+ 6 + + 7 + + type HandlerProps = { +
+ 7 + + 8 + + url: string; +
+
+
+ 15 + + 16 + + pullRequest: setEvent +
+ 16 + + 17 + + }); +
+ 17 + + 18 + + }, [url]); +
+ + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + 20 + + if (event) { +
+ 19 + + 21 + + return ( +
+ 20 + + + <Toast type="warning" title="New Changes"> +
+ 21 + + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> +
+ 22 + + + <p>Warning: Non saved modification will be lost.</p> +
+ + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + 25 + + <ToastButtons> +
+ 24 + + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> +
+ 25 + + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> +
+ + 26 + + <ToastButton icon="redo" onClick={reload}> +
+ + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + 28 + + </ToastButton> +
+ + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
+ + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + 31 + + </ToastButton> +
+ 26 + + 32 + + </ToastButtons> +
+ 27 + + 33 + + </Toast> +
+ 28 + + 34 + + ); +
+
- - - - - - - - - - - - - + +
-
- + + + + +
+ - 181 - + - 181 - - "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - + + + + + + + + + + +
+ + + + + + + + - 182 - - + + + + + + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ 181 + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
+ 182 + + 182 + + } +
+ 183 + + 183 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "Neue Änderungen", -
- - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Neu laden", -
- - 191 - - "ignore": "Ignorieren" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
- -
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- +
- - - - - - - - - -
- - - - - - - - - + + - 181 - - + + + - 181 - - + + + - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - - - + + + - 182 - - + + + - 182 - - + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + - - - + - 185 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "Neue Änderungen", +
+ + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Neu laden", +
+ + 191 + + "ignore": "Ignorieren" +
+ + 192 + } -
- 183 - - 183 - +
+ 184 + + 193 + } -
- - 184 - +
+ 185 + + 194 + }, -
- +
- "changeNotification": { -
- - 186 - - "title": "New Changes", -
- - 187 - - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", -
- - 188 - - "modificationWarning": "Warning: Non saved modification will be lost.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Reload", -
- - 191 - - "ignore": "Ignore" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
+
+ 186 + + 195 + + "permissions": { +
+
-
-
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 181 + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
+ 182 + + 182 + + } +
+ 183 + + 183 + + } +
+ + 184 + + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "New Changes", +
+ + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
+ + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Reload", +
+ + 191 + + "ignore": "Ignore" +
+ + 192 + + } +
+ 184 + + 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + +
+
- 7 - - 7 - - import org.mockito.Mock; -
- 8 - - 8 - - import org.mockito.junit.jupiter.MockitoExtension; -
- 9 - - 9 - - import sonia.scm.security.SessionId; -
- - 10 - + - -
- 10 - - 11 - - import javax.ws.rs.sse.OutboundSseEvent; -
- 11 - - 12 - - import javax.ws.rs.sse.SseEventSink; -
- 12 - - - -
- 13 - - 13 - - import java.time.Clock; -
- 14 - - 14 - - import java.time.Instant; -
- 15 - - 15 - - import java.time.LocalDateTime; -
- 16 - - 16 - - import java.time.ZoneOffset; -
- 17 - - 17 - - import java.time.temporal.ChronoField; -
- 18 - - - import java.time.temporal.ChronoUnit; -
- 19 - - - import java.time.temporal.TemporalField; -
- 20 - - 18 - - import java.util.concurrent.CompletableFuture; -
- 21 - - 19 - - import java.util.concurrent.CompletionStage; -
- 22 - - - import java.util.concurrent.atomic.AtomicLong; -
- 23 - - 20 - - import java.util.concurrent.atomic.AtomicReference; -
- 24 - - 21 - - -
- 25 - - 22 - - import static java.time.temporal.ChronoUnit.MINUTES; -
- - + + + + + -
+ 7 + +
+ + + + + + + + + + + + + + - - - - - + + + - 83 - - + + + + - 80 - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 7 + + import org.mockito.Mock; +
+ 8 + + 8 + + import org.mockito.junit.jupiter.MockitoExtension; +
+ 9 + + 9 + + import sonia.scm.security.SessionId; +
-
+ 10 + + +
+ 10 + + 11 + + import javax.ws.rs.sse.OutboundSseEvent; +
+ 11 + + 12 + + import javax.ws.rs.sse.SseEventSink; +
- 84 - - 81 - - @Test -
- 85 - - 82 - - @SuppressWarnings("unchecked") -
- 86 - - - void shouldCloseEventSinkOnFailure() throws InterruptedException { -
- - 83 - - void shouldCloseEventSinkOnFailure() { -
- 87 - - 84 - - CompletionStage future = CompletableFuture.supplyAsync(() -> { -
- 88 - - 85 - - throw new RuntimeException("failed to send message"); -
- 89 - - 86 - - }); -
-
+ 12 +
-
+ 13 + + 13 + + import java.time.Clock; +
+ 14 + + 14 + + import java.time.Instant; +
+ 15 + + 15 + + import java.time.LocalDateTime; +
+ 16 + + 16 + + import java.time.ZoneOffset; +
+ 17 + + 17 + + import java.time.temporal.ChronoField; +
+ 18 + + + import java.time.temporal.ChronoUnit; +
+ 19 + + + import java.time.temporal.TemporalField; +
+ 20 + + 18 + + import java.util.concurrent.CompletableFuture; +
+ 21 + + 19 + + import java.util.concurrent.CompletionStage; +
+ 22 + + + import java.util.concurrent.atomic.AtomicLong; +
+ 23 + + 20 + + import java.util.concurrent.atomic.AtomicReference; +
+ 24 + + 21 + + +
+ 25 + + 22 + + import static java.time.temporal.ChronoUnit.MINUTES; +
+
+
+ 83 + + 80 + + +
+ 84 + + 81 + + @Test +
+ 85 + + 82 + + @SuppressWarnings("unchecked") +
+ 86 + + + void shouldCloseEventSinkOnFailure() throws InterruptedException { +
+ + 83 + + void shouldCloseEventSinkOnFailure() { +
+ 87 + + 84 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { +
+ 88 + + 85 + + throw new RuntimeException("failed to send message"); +
+ 89 + + 86 + + }); +
+
+
+ 91 + + 88 + + +
+ 92 + + 89 + + client.send(message); +
+ 93 + + 90 + + +
+ 94 + + + Thread.sleep(50L); +
+ 95 + + + +
+ 96 + + + verify(eventSink).close(); +
+ + 91 + + verify(eventSink, timeout(50L)).close(); +
+ 97 + + 92 + + } +
+ 98 + + 93 + + +
+ 99 + + 94 + + @Test +
+
+ +
+
+
- - - 91 - - - 88 - - - - - - - - 92 - - - 89 - - - client.send(message); - - - - - 93 - - - 90 - - - - - - - - 94 - - - - Thread.sleep(50L); - - - + + modify + +
+
- - 95 - - + + + + + +
+
+
+ + +
+ + + - - - - - - - + + - - + + + - verify(eventSink, timeout(50L)).close(); - - - - + + + + - 97 - - + + + + - 92 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - -
- -
- 96 - - - verify(eventSink).close(); -
- - 91 - + + 1 + + import java.io.PrintStream; +
+ 1 + + 2 + + import java.util.Arrays; +
+ 2 + + 3 + + +
+ 3 + + 4 + + class Main { +
+ + 5 + + private static final PrintStream OUT = System.out; +
+ + 6 + + +
+ 4 + + 7 + + public static void main(String[] args) { +
+ + 8 + + <<<<<<< HEAD +
+ 5 + + 9 + + System.out.println("Expect nothing more to happen."); +
+ 6 + + 10 + + System.out.println("The command line parameters are:"); +
+ 7 + + 11 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); +
+ + 12 + + ======= +
+ + 13 + + OUT.println("Expect nothing more to happen."); +
+ + 14 + + OUT.println("Parameters:"); +
+ + 15 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); +
+ + 16 + + >>>>>>> feature/use_constant +
+ 8 + + 17 + + } +
+ 9 + + 18 + } -
- 98 - - 93 - - -
- 99 - - 94 - - @Test -
-
- -
-
-
-
- - - Main.java - - - modify - -
-
-
-
- - - - - -
-
-
+ + + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 1 - - import java.io.PrintStream; -
- 1 - - 2 - - import java.util.Arrays; -
- 2 - - 3 - - -
- 3 - - 4 - - class Main { -
- - 5 - - private static final PrintStream OUT = System.out; -
- - 6 - - -
- 4 - - 7 - - public static void main(String[] args) { -
- - 8 - - <<<<<<< HEAD -
- 5 - - 9 - - System.out.println("Expect nothing more to happen."); -
- 6 - - 10 - - System.out.println("The command line parameters are:"); -
- 7 - - 11 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); -
- - 12 - - ======= -
- - 13 - - OUT.println("Expect nothing more to happen."); -
- - 14 - - OUT.println("Parameters:"); -
- - 15 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); -
- - 16 - - >>>>>>> feature/use_constant -
- 8 - - 17 - - } -
- 9 - - 18 - - } -
-
`; @@ -10463,4304 +10491,4312 @@ exports[`Storyshots Diff Expandable 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
- 1 - - 1 - - package com.cloudogu.scm.review.events; -
- 2 - - 2 - - -
- 3 - +
- import com.cloudogu.scm.review.comment.service.BasicComment; -
- 4 - - - import com.cloudogu.scm.review.comment.service.BasicCommentEvent; -
- 5 - - - import com.cloudogu.scm.review.comment.service.CommentEvent; -
- 6 - - - import com.cloudogu.scm.review.comment.service.ReplyEvent; -
- 7 - - 3 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; -
- 8 - - 4 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; -
- 9 - - - import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; -
- 10 - - 5 - - import com.github.legman.Subscribe; -
- 11 - - - import lombok.Data; -
- 12 - - 6 - - import org.apache.shiro.SecurityUtils; -
- 13 - - 7 - - import org.apache.shiro.subject.PrincipalCollection; -
- 14 - - 8 - - import org.apache.shiro.subject.Subject; -
- 15 - - 9 - - import sonia.scm.EagerSingleton; -
- 16 - - - import sonia.scm.HandlerEventType; -
- 17 - - - import sonia.scm.event.HandlerEvent; -
- 18 - - 10 - - import sonia.scm.plugin.Extension; -
- 19 - - 11 - - import sonia.scm.repository.Repository; -
- 20 - - 12 - - import sonia.scm.security.SessionId; -
-
+ 1 +
+ 1 + + package com.cloudogu.scm.review.events; +
+ 2 + + 2 + - - - - diff.expandLastBottomByLines - - +
+ 3 + + + import com.cloudogu.scm.review.comment.service.BasicComment; +
+ 4 + + + import com.cloudogu.scm.review.comment.service.BasicCommentEvent; +
+ 5 + + + import com.cloudogu.scm.review.comment.service.CommentEvent; +
+ 6 + + + import com.cloudogu.scm.review.comment.service.ReplyEvent; +
+ 7 + + 3 + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; +
+ 8 + + 4 + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; +
+ 9 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; +
+ 10 + + 5 + + import com.github.legman.Subscribe; +
+ 11 + + + import lombok.Data; +
+ 12 + + 6 + + import org.apache.shiro.SecurityUtils; +
+ 13 + + 7 + + import org.apache.shiro.subject.PrincipalCollection; +
+ 14 + + 8 + + import org.apache.shiro.subject.Subject; +
+ 15 + + 9 + + import sonia.scm.EagerSingleton; +
+ 16 + + + import sonia.scm.HandlerEventType; +
+ 17 + + + import sonia.scm.event.HandlerEvent; +
+ 18 + + 10 + + import sonia.scm.plugin.Extension; +
+ 19 + + 11 + + import sonia.scm.repository.Repository; +
+ 20 + + 12 + + import sonia.scm.security.SessionId; +
+
- + + + + diff.expandLastBottomByLines + - diff.expandLastBottomComplete - -
-
+ + + + diff.expandLastBottomComplete + +
+ + + + +
- -
- - - src/main/js/ChangeNotification.tsx - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - + + + + + + - - - - + + + diff.expandComplete + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
-
+
- - - - diff.expandComplete - - -
- 2 - - 2 - - import { Link } from "@scm-manager/ui-types"; -
- 3 - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - 4 - - import { PullRequest } from "./types/PullRequest"; -
- - 5 - - import { useTranslation } from "react-i18next"; -
- 5 - - 6 - - -
- 6 - - 7 - - type HandlerProps = { -
- 7 - - 8 - - url: string; -
-
- - - - diff.expandComplete - -
-
-
+
- - - - diff.expandComplete - - -
- 15 - - 16 - - pullRequest: setEvent -
- 16 - - 17 - - }); -
- 17 - - 18 - - }, [url]); -
- - 19 - - const { t } = useTranslation("plugins"); -
- 18 - - 20 - - if (event) { -
- 19 - - 21 - - return ( -
- 20 - - - <Toast type="warning" title="New Changes"> -
- 21 - - - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> -
- 22 - - - <p>Warning: Non saved modification will be lost.</p> -
- - 22 - - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> -
- - 23 - - <p>{t("scm-review-plugin.changeNotification.description")}</p> -
- - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - 25 - - <ToastButtons> -
- 24 - - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> -
- 25 - - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> -
- - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - 28 - - </ToastButton> -
- - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - 31 - - </ToastButton> -
- 26 - - 32 - - </ToastButtons> -
- 27 - - 33 - - </Toast> -
- 28 - - 34 - - ); -
-
+
+ import { Link } from "@scm-manager/ui-types"; +
+ 3 + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + 4 + + import { PullRequest } from "./types/PullRequest"; +
+ + 5 + + import { useTranslation } from "react-i18next"; +
+ 5 + + 6 + - - - - diff.expandLastBottomByLines - - +
+ 6 + + 7 + + type HandlerProps = { +
+ 7 + + 8 + + url: string; +
+
- + + + + diff.expandComplete + +
+
+
+ + + + diff.expandComplete + +
+
+ 15 + + 16 + + pullRequest: setEvent +
+ 16 + + 17 + + }); +
+ 17 + + 18 + + }, [url]); +
+ + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + 20 + + if (event) { +
+ 19 + + 21 + + return ( +
+ 20 + + + <Toast type="warning" title="New Changes"> +
+ 21 + + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> +
+ 22 + + + <p>Warning: Non saved modification will be lost.</p> +
+ + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + 25 + + <ToastButtons> +
+ 24 + + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> +
+ 25 + + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> +
+ + 26 + + <ToastButton icon="redo" onClick={reload}> +
+ + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + 28 + + </ToastButton> +
+ + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
+ + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + 31 + + </ToastButton> +
+ 26 + + 32 + + </ToastButtons> +
+ 27 + + 33 + + </Toast> +
+ 28 + + 34 + + ); +
+
+ + + + diff.expandLastBottomByLines + - diff.expandLastBottomComplete - -
-
+ + + + diff.expandLastBottomComplete + +
+ + + + + - -
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/resources/locales/de/plugins.json + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - + + + + + + - - - - + + + diff.expandComplete + + + + + + - - + + + + - 181 - - - - - - - + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
+
- - + + + + diff.expandByLines + - diff.expandByLines - - - - - - diff.expandComplete - - -
- 181 - + 181 + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
- "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - - 182 - + 182 + + 182 + + } +
+ 183 + + 183 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "Neue Änderungen", -
- - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Neu laden", -
- - 191 - - "ignore": "Ignorieren" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
+
- - - - diff.expandLastBottomByLines - - - - - - diff.expandLastBottomComplete - - -
-
- -
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- + - - - - -
-
-
-
-
-
- - - - - - - - - + -
+
- - - - - + + - 181 - - + + + - 181 - - + + + - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - - - + + + - 182 - - + + + - 182 - - + + + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - -
+
- - - - diff.expandByLines - - - - - - diff.expandComplete - - -
+ + "changeNotification": { +
+ + 186 + + "title": "Neue Änderungen", +
+ + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Neu laden", +
+ + 191 + + "ignore": "Ignorieren" +
+ + 192 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "New Changes", -
- - 187 - - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", -
- - 188 - - "modificationWarning": "Warning: Non saved modification will be lost.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Reload", -
- - 191 - - "ignore": "Ignore" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
- +
+ 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
- + + + + diff.expandLastBottomByLines + - diff.expandLastBottomByLines - - - - - - diff.expandLastBottomComplete - -
-
+ + + + diff.expandLastBottomComplete + +
+ + + + +
- -
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + diff.expandByLines + + + + + + diff.expandComplete + +
+
+ 181 + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
+ 182 + + 182 + + } +
+ 183 + + 183 + + } +
+ + 184 + + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "New Changes", +
+ + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
+ + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Reload", +
+ + 191 + + "ignore": "Ignore" +
+ + 192 + + } +
+ 184 + + 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
+ + + + diff.expandLastBottomByLines + + + + + + diff.expandLastBottomComplete + +
+
+
- - - - - - - - - - - - + + + +
+
+ + + src/test/java/com/cloudogu/scm/review/events/ClientTest.java + + + modify + + +
+
- - - diff.expandComplete + + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - + -
+ 10 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + diff.expandComplete + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- 7 - - 7 - - import org.mockito.Mock; -
- 8 - - 8 - - import org.mockito.junit.jupiter.MockitoExtension; -
- 9 - - 9 - - import sonia.scm.security.SessionId; -
+
- 10 - - -
- 10 - - 11 - - import javax.ws.rs.sse.OutboundSseEvent; -
- 11 - - 12 - - import javax.ws.rs.sse.SseEventSink; -
- 12 - - - -
- 13 - - 13 - - import java.time.Clock; -
- 14 - - 14 - - import java.time.Instant; -
- 15 - - 15 - - import java.time.LocalDateTime; -
- 16 - - 16 - - import java.time.ZoneOffset; -
- 17 - - 17 - - import java.time.temporal.ChronoField; -
- 18 - - - import java.time.temporal.ChronoUnit; -
- 19 - - - import java.time.temporal.TemporalField; -
- 20 - - 18 - - import java.util.concurrent.CompletableFuture; -
- 21 - - 19 - - import java.util.concurrent.CompletionStage; -
- 22 - - - import java.util.concurrent.atomic.AtomicLong; -
- 23 - - 20 - - import java.util.concurrent.atomic.AtomicReference; -
- 24 - - 21 - - -
- 25 - - 22 - - import static java.time.temporal.ChronoUnit.MINUTES; -
-
+
- - - - diff.expandByLines - + + + + diff.expandComplete + + +
+ 7 + + 7 + + import org.mockito.Mock; +
+ 8 + + 8 + + import org.mockito.junit.jupiter.MockitoExtension; +
+ 9 + + 9 + + import sonia.scm.security.SessionId; +
+ + 10 + - - - - diff.expandComplete - - -
+
+ 11 + + import javax.ws.rs.sse.OutboundSseEvent; +
+ 11 + + 12 + + import javax.ws.rs.sse.SseEventSink; +
+ 12 + + - - - - diff.expandByLines - - +
+ 13 + + 13 + + import java.time.Clock; +
+ 14 + + 14 + + import java.time.Instant; +
+ 15 + + 15 + + import java.time.LocalDateTime; +
+ 16 + + 16 + + import java.time.ZoneOffset; +
+ 17 + + 17 + + import java.time.temporal.ChronoField; +
+ 18 + + + import java.time.temporal.ChronoUnit; +
+ 19 + + + import java.time.temporal.TemporalField; +
+ 20 + + 18 + + import java.util.concurrent.CompletableFuture; +
+ 21 + + 19 + + import java.util.concurrent.CompletionStage; +
+ 22 + + + import java.util.concurrent.atomic.AtomicLong; +
+ 23 + + 20 + + import java.util.concurrent.atomic.AtomicReference; +
+ 24 + + 21 + + +
+ 25 + + 22 + + import static java.time.temporal.ChronoUnit.MINUTES; +
+
- + + + + diff.expandByLines + - diff.expandComplete - -
-
+
+ + + + diff.expandByLines + + + + + + diff.expandComplete + +
+
+ 83 + + 80 + + +
+ 84 + + 81 + + @Test +
+ 85 + + 82 + + @SuppressWarnings("unchecked") +
+ 86 + + + void shouldCloseEventSinkOnFailure() throws InterruptedException { +
+ + 83 + + void shouldCloseEventSinkOnFailure() { +
+ 87 + + 84 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { +
+ 88 + + 85 + + throw new RuntimeException("failed to send message"); +
+ 89 + + 86 + + }); +
+
+ + + + diff.expandComplete + +
+
+
+ + + + diff.expandComplete + +
+
+ 91 + + 88 + + +
+ 92 + + 89 + + client.send(message); +
+ 93 + + 90 + + +
+ 94 + + + Thread.sleep(50L); +
+ 95 + + + +
+ 96 + + + verify(eventSink).close(); +
+ + 91 + + verify(eventSink, timeout(50L)).close(); +
+ 97 + + 92 + + } +
+ 98 + + 93 + + +
+ 99 + + 94 + + @Test +
+
+ + + + diff.expandLastBottomByLines + + + + + + diff.expandLastBottomComplete + +
+
+
+ +
+
+
- - - 83 - - - 80 - - - - - - - - 84 - - - 81 - - - @Test - - - - - 85 - - - 82 - - - @SuppressWarnings("unchecked") - - - - - 86 - - - - void shouldCloseEventSinkOnFailure() throws InterruptedException { - - - + + modify + +
+
- - - 83 - - - void shouldCloseEventSinkOnFailure() { - - - - - 87 - - - 84 - - - CompletionStage future = CompletableFuture.supplyAsync(() -> { - - - - - 88 - - - 85 - - - throw new RuntimeException("failed to send message"); - - - - - 89 - - - 86 - - - }); - - - - - -
- - - diff.expandComplete + + +
- - - - +
+
+
+
+ - - + + + + + + -
+
- - - - - + + - 91 - - + + + + - 88 - - + + + + - - - - - + + + + - 92 - - + + + - 89 - - + + + - client.send(message); - - - - + + + + - 93 - - + + + - 90 - - + + + + - - - - - + + + + - 94 - - + + + + - Thread.sleep(50L); - - - - + + + - 95 - - + + + - - - - - + + + - 96 - - + + + - verify(eventSink).close(); - - - - + + + - 91 - - - - - - - + + + + + + + - - + + + - - - - - - - - - - - - - - - -
+
- - - - diff.expandComplete - - -
+ + import java.io.PrintStream; +
+ 1 + + 2 + + import java.util.Arrays; +
+ 2 + + 3 + + +
+ 3 + + 4 + + class Main { +
+ + 5 + + private static final PrintStream OUT = System.out; +
+ + 6 + + +
+ 4 + + 7 + + public static void main(String[] args) { +
+ + 8 + + <<<<<<< HEAD +
+ 5 + + 9 + + System.out.println("Expect nothing more to happen."); +
+ 6 + + 10 + + System.out.println("The command line parameters are:"); +
- + 7 + + 11 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); +
+ + 12 + + ======= +
- + + 13 + + OUT.println("Expect nothing more to happen."); +
+ + 14 + + OUT.println("Parameters:"); +
- + + 15 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); +
- + + 16 + + >>>>>>> feature/use_constant +
- verify(eventSink, timeout(50L)).close(); -
- 97 - - 92 - + 8 + + 17 + + } +
+ 9 + + 18 + } -
- 98 - - 93 - - -
- 99 - - 94 - - @Test -
-
+
- - + + + + diff.expandLastBottomByLines + - diff.expandLastBottomByLines - - - - - - diff.expandLastBottomComplete - - -
-
- -
-
-
-
- - - Main.java - - - modify - -
-
-
-
- - - - - -
-
-
+ + + + diff.expandLastBottomComplete + +
+ + + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 1 - - import java.io.PrintStream; -
- 1 - - 2 - - import java.util.Arrays; -
- 2 - - 3 - - -
- 3 - - 4 - - class Main { -
- - 5 - - private static final PrintStream OUT = System.out; -
- - 6 - - -
- 4 - - 7 - - public static void main(String[] args) { -
- - 8 - - <<<<<<< HEAD -
- 5 - - 9 - - System.out.println("Expect nothing more to happen."); -
- 6 - - 10 - - System.out.println("The command line parameters are:"); -
- 7 - - 11 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); -
- - 12 - - ======= -
- - 13 - - OUT.println("Expect nothing more to happen."); -
- - 14 - - OUT.println("Parameters:"); -
- - 15 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); -
- - 16 - - >>>>>>> feature/use_constant -
- 8 - - 17 - - } -
- 9 - - 18 - - } -
-
- - - - diff.expandLastBottomByLines - - - - - - diff.expandLastBottomComplete - -
-
-
`; @@ -14769,3858 +14805,3866 @@ exports[`Storyshots Diff File Annotation 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - + + + + +
-
-
-

- Custom File annotation for - src/main/java/com/cloudogu/scm/review/events/EventListener.java -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 1 - - 1 - - package com.cloudogu.scm.review.events; -
- 2 - - 2 - - -
- 3 - - - import com.cloudogu.scm.review.comment.service.BasicComment; -
- 4 - - - import com.cloudogu.scm.review.comment.service.BasicCommentEvent; -
- 5 - - - import com.cloudogu.scm.review.comment.service.CommentEvent; -
- 6 - - - import com.cloudogu.scm.review.comment.service.ReplyEvent; -
- 7 - - 3 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; -
- 8 - - 4 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; -
- 9 - - - import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; -
- 10 - - 5 - - import com.github.legman.Subscribe; -
- 11 - - - import lombok.Data; -
- 12 - - 6 - - import org.apache.shiro.SecurityUtils; -
- 13 - - 7 - - import org.apache.shiro.subject.PrincipalCollection; -
- 14 - - 8 - - import org.apache.shiro.subject.Subject; -
- 15 - - 9 - - import sonia.scm.EagerSingleton; -
- 16 - - - import sonia.scm.HandlerEventType; -
- 17 - - - import sonia.scm.event.HandlerEvent; -
- 18 - - 10 - - import sonia.scm.plugin.Extension; -
- 19 - - 11 - - import sonia.scm.repository.Repository; -
- 20 - - 12 - - import sonia.scm.security.SessionId; -
-
-
-
-
-
+ Custom File annotation for + src/main/java/com/cloudogu/scm/review/events/EventListener.java +

+ - - - src/main/js/ChangeNotification.tsx - - - modify - - -
-
-
- - - - - -
-
-
- - -
-

- Custom File annotation for - src/main/js/ChangeNotification.tsx -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + + + - 6 - - + + + + - - - - - - - - - - - - - - - - - + - - - - - + + - 15 - - + + + - 16 - - + + + - pullRequest: setEvent - - - - + + + - 16 - - + + + + - 17 - - + + + + - }); - - - - + + + - 17 - - + + + + - 18 - - + + + - }, [url]); - - - - + + + + - 19 - - + + + + - const { t } = useTranslation("plugins"); - - - - + + + + - 18 - - + + + + - 20 - - + + + - if (event) { - - - - + + + - 19 - - + + + + - 21 - - + + + + - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 2 - - 2 - - import { Link } from "@scm-manager/ui-types"; -
- 3 - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - 4 - - import { PullRequest } from "./types/PullRequest"; -
+
- 5 - - import { useTranslation } from "react-i18next"; -
- 5 - + 1 + + 1 + + package com.cloudogu.scm.review.events; +
+ 2 + + 2 + + +
- 6 - - 7 - - type HandlerProps = { -
- 7 - - 8 - - url: string; -
-
+ 3 +
-
+ import com.cloudogu.scm.review.comment.service.BasicComment; +
+ 4 + + + import com.cloudogu.scm.review.comment.service.BasicCommentEvent; +
+ 5 + + + import com.cloudogu.scm.review.comment.service.CommentEvent; +
+ 6 + + + import com.cloudogu.scm.review.comment.service.ReplyEvent; +
+ 7 + + 3 + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; +
+ 8 + + 4 + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; +
+ 9 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; +
+ 10 + + 5 + + import com.github.legman.Subscribe; +
+ 11 + + + import lombok.Data; +
- + 12 + + 6 + + import org.apache.shiro.SecurityUtils; +
+ 13 + + 7 + + import org.apache.shiro.subject.PrincipalCollection; +
+ 14 + + 8 + + import org.apache.shiro.subject.Subject; +
+ 15 + + 9 + + import sonia.scm.EagerSingleton; +
+ 16 + + + import sonia.scm.HandlerEventType; +
+ 17 + + + import sonia.scm.event.HandlerEvent; +
+ 18 + + 10 + + import sonia.scm.plugin.Extension; +
+ 19 + + 11 + + import sonia.scm.repository.Repository; +
- 20 - - - <Toast type="warning" title="New Changes"> -
- 21 - - - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> -
- 22 - - - <p>Warning: Non saved modification will be lost.</p> -
- - 22 - - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> -
- - 23 - - <p>{t("scm-review-plugin.changeNotification.description")}</p> -
- - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - 25 - - <ToastButtons> -
- 24 - - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> -
- 25 - - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> -
- - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - 28 - - </ToastButton> -
- - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - 31 - - </ToastButton> -
- 26 - - 32 - - </ToastButtons> -
- 27 - - 33 - - </Toast> -
- 28 - - 34 - - ); -
+ + 20 + + + 12 + + + import sonia.scm.security.SessionId; + + + + +
-
-
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - + + + + +
+
+

+ Custom File annotation for + src/main/js/ChangeNotification.tsx +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 2 + + 2 + + import { Link } from "@scm-manager/ui-types"; +
+ 3 + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + 4 + + import { PullRequest } from "./types/PullRequest"; +
+ + 5 + + import { useTranslation } from "react-i18next"; +
+ 5 + + 6 + + +
+ 6 + + 7 + + type HandlerProps = { +
+ 7 + + 8 + + url: string; +
+
+
+ 15 + + 16 + + pullRequest: setEvent +
+ 16 + + 17 + + }); +
+ 17 + + 18 + + }, [url]); +
+ + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + 20 + + if (event) { +
+ 19 + + 21 + + return ( +
+ 20 + + + <Toast type="warning" title="New Changes"> +
+ 21 + + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> +
+ 22 + + + <p>Warning: Non saved modification will be lost.</p> +
+ + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + 25 + + <ToastButtons> +
+ 24 + + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> +
+ 25 + + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> +
+ + 26 + + <ToastButton icon="redo" onClick={reload}> +
+ + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + 28 + + </ToastButton> +
+ + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
+ + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + 31 + + </ToastButton> +
+ 26 + + 32 + + </ToastButtons> +
+ 27 + + 33 + + </Toast> +
+ 28 + + 34 + + ); +
+
-

- Custom File annotation for - src/main/resources/locales/de/plugins.json -

- - - - - - - - - - - - - + +
-
- + + + + +
+ - 181 - + - 181 - - "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - + + + + + + + + + + +
+

+ Custom File annotation for + src/main/resources/locales/de/plugins.json +

+ + + + + + + + - 182 - - + + + + + + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ 181 + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
+ 182 + + 182 + + } +
+ 183 + + 183 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "Neue Änderungen", -
- - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Neu laden", -
- - 191 - - "ignore": "Ignorieren" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
- -
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- +
- - - - - - - - - -
-

- Custom File annotation for - src/main/resources/locales/en/plugins.json -

- - - - - - - - - + + - 181 - - + + + - 181 - - + + + - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - - - + + + - 182 - - + + + - 182 - - + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + - - - + - 185 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "Neue Änderungen", +
+ + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Neu laden", +
+ + 191 + + "ignore": "Ignorieren" +
+ + 192 + } -
- 183 - - 183 - +
+ 184 + + 193 + } -
- - 184 - +
+ 185 + + 194 + }, -
- +
- "changeNotification": { -
- - 186 - - "title": "New Changes", -
- - 187 - - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", -
- - 188 - - "modificationWarning": "Warning: Non saved modification will be lost.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Reload", -
- - 191 - - "ignore": "Ignore" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
+
+ 186 + + 195 + + "permissions": { +
+
-
-
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - + + + + +
+
+

+ Custom File annotation for + src/main/resources/locales/en/plugins.json +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 181 + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
+ 182 + + 182 + + } +
+ 183 + + 183 + + } +
+ + 184 + + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "New Changes", +
+ + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
+ + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Reload", +
+ + 191 + + "ignore": "Ignore" +
+ + 192 + + } +
+ 184 + + 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
-

- Custom File annotation for - src/test/java/com/cloudogu/scm/review/events/ClientTest.java -

- - - - - - - - - - - - - - - - - - - - - - - - - - - + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + +
+

+ Custom File annotation for + src/test/java/com/cloudogu/scm/review/events/ClientTest.java +

+
- 7 - - 7 - - import org.mockito.Mock; -
- 8 - - 8 - - import org.mockito.junit.jupiter.MockitoExtension; -
- 9 - - 9 - - import sonia.scm.security.SessionId; -
- - 10 - + - -
- 10 - - 11 - - import javax.ws.rs.sse.OutboundSseEvent; -
- 11 - - 12 - - import javax.ws.rs.sse.SseEventSink; -
- 12 - - - -
- 13 - - 13 - - import java.time.Clock; -
- 14 - - 14 - - import java.time.Instant; -
- 15 - - 15 - - import java.time.LocalDateTime; -
- 16 - - 16 - - import java.time.ZoneOffset; -
- 17 - - 17 - - import java.time.temporal.ChronoField; -
- 18 - - - import java.time.temporal.ChronoUnit; -
- 19 - - - import java.time.temporal.TemporalField; -
- 20 - - 18 - - import java.util.concurrent.CompletableFuture; -
- 21 - - 19 - - import java.util.concurrent.CompletionStage; -
- 22 - - - import java.util.concurrent.atomic.AtomicLong; -
- 23 - - 20 - - import java.util.concurrent.atomic.AtomicReference; -
- 24 - - 21 - - -
- 25 - - 22 - - import static java.time.temporal.ChronoUnit.MINUTES; -
- - + + + + + -
+ 7 + +
+ + + + + + + + + + + + + + - - - - - + + + - 83 - - + + + + - 80 - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 7 + + import org.mockito.Mock; +
+ 8 + + 8 + + import org.mockito.junit.jupiter.MockitoExtension; +
+ 9 + + 9 + + import sonia.scm.security.SessionId; +
-
+ 10 + + +
+ 10 + + 11 + + import javax.ws.rs.sse.OutboundSseEvent; +
+ 11 + + 12 + + import javax.ws.rs.sse.SseEventSink; +
- 84 - - 81 - - @Test -
- 85 - - 82 - - @SuppressWarnings("unchecked") -
- 86 - - - void shouldCloseEventSinkOnFailure() throws InterruptedException { -
- - 83 - - void shouldCloseEventSinkOnFailure() { -
- 87 - - 84 - - CompletionStage future = CompletableFuture.supplyAsync(() -> { -
- 88 - - 85 - - throw new RuntimeException("failed to send message"); -
- 89 - - 86 - - }); -
-
+ 12 +
-
+ 13 + + 13 + + import java.time.Clock; +
+ 14 + + 14 + + import java.time.Instant; +
+ 15 + + 15 + + import java.time.LocalDateTime; +
+ 16 + + 16 + + import java.time.ZoneOffset; +
+ 17 + + 17 + + import java.time.temporal.ChronoField; +
+ 18 + + + import java.time.temporal.ChronoUnit; +
+ 19 + + + import java.time.temporal.TemporalField; +
+ 20 + + 18 + + import java.util.concurrent.CompletableFuture; +
+ 21 + + 19 + + import java.util.concurrent.CompletionStage; +
+ 22 + + + import java.util.concurrent.atomic.AtomicLong; +
+ 23 + + 20 + + import java.util.concurrent.atomic.AtomicReference; +
+ 24 + + 21 + + +
+ 25 + + 22 + + import static java.time.temporal.ChronoUnit.MINUTES; +
+
+
+ 83 + + 80 + + +
+ 84 + + 81 + + @Test +
+ 85 + + 82 + + @SuppressWarnings("unchecked") +
+ 86 + + + void shouldCloseEventSinkOnFailure() throws InterruptedException { +
+ + 83 + + void shouldCloseEventSinkOnFailure() { +
+ 87 + + 84 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { +
+ 88 + + 85 + + throw new RuntimeException("failed to send message"); +
+ 89 + + 86 + + }); +
+
+
+ 91 + + 88 + + +
+ 92 + + 89 + + client.send(message); +
+ 93 + + 90 + + +
+ 94 + + + Thread.sleep(50L); +
+ 95 + + + +
+ 96 + + + verify(eventSink).close(); +
+ + 91 + + verify(eventSink, timeout(50L)).close(); +
+ 97 + + 92 + + } +
+ 98 + + 93 + + +
+ 99 + + 94 + + @Test +
+
+ +
+
+
- - - 91 - - - 88 - - - - - - - - 92 - - - 89 - - - client.send(message); - - - - - 93 - - - 90 - - - - - - - - 94 - - - - Thread.sleep(50L); - - - + + modify + +
+
- - 95 - - + + + + + +
+
+
+ + +
+

+ Custom File annotation for + Main.java +

+ + + - - - - - - - + + - - + + + - verify(eventSink, timeout(50L)).close(); - - - - + + + + - 97 - - + + + + - 92 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - -
- -
- 96 - - - verify(eventSink).close(); -
- - 91 - + + 1 + + import java.io.PrintStream; +
+ 1 + + 2 + + import java.util.Arrays; +
+ 2 + + 3 + + +
+ 3 + + 4 + + class Main { +
+ + 5 + + private static final PrintStream OUT = System.out; +
+ + 6 + + +
+ 4 + + 7 + + public static void main(String[] args) { +
+ + 8 + + <<<<<<< HEAD +
+ 5 + + 9 + + System.out.println("Expect nothing more to happen."); +
+ 6 + + 10 + + System.out.println("The command line parameters are:"); +
+ 7 + + 11 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); +
+ + 12 + + ======= +
+ + 13 + + OUT.println("Expect nothing more to happen."); +
+ + 14 + + OUT.println("Parameters:"); +
+ + 15 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); +
+ + 16 + + >>>>>>> feature/use_constant +
+ 8 + + 17 + + } +
+ 9 + + 18 + } -
- 98 - - 93 - - -
- 99 - - 94 - - @Test -
-
- -
-
-
-
- - - Main.java - - - modify - -
-
-
-
- - - - - -
-
-
+ + + +
-
-

- Custom File annotation for - Main.java -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 1 - - import java.io.PrintStream; -
- 1 - - 2 - - import java.util.Arrays; -
- 2 - - 3 - - -
- 3 - - 4 - - class Main { -
- - 5 - - private static final PrintStream OUT = System.out; -
- - 6 - - -
- 4 - - 7 - - public static void main(String[] args) { -
- - 8 - - <<<<<<< HEAD -
- 5 - - 9 - - System.out.println("Expect nothing more to happen."); -
- 6 - - 10 - - System.out.println("The command line parameters are:"); -
- 7 - - 11 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); -
- - 12 - - ======= -
- - 13 - - OUT.println("Expect nothing more to happen."); -
- - 14 - - OUT.println("Parameters:"); -
- - 15 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); -
- - 16 - - >>>>>>> feature/use_constant -
- 8 - - 17 - - } -
- 9 - - 18 - - } -
-
`; @@ -18629,3942 +18673,3950 @@ exports[`Storyshots Diff File Controls 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - -
-
- + + + +
+
- - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 1 - - 1 - - package com.cloudogu.scm.review.events; -
- 2 - - 2 - - -
- 3 - - - import com.cloudogu.scm.review.comment.service.BasicComment; -
- 4 - - - import com.cloudogu.scm.review.comment.service.BasicCommentEvent; -
- 5 - - - import com.cloudogu.scm.review.comment.service.CommentEvent; -
- 6 - - - import com.cloudogu.scm.review.comment.service.ReplyEvent; -
- 7 - - 3 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; -
- 8 - - 4 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; -
- 9 - - - import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; -
- 10 - - 5 - - import com.github.legman.Subscribe; -
- 11 - - - import lombok.Data; -
- 12 - - 6 - - import org.apache.shiro.SecurityUtils; -
- 13 - - 7 - - import org.apache.shiro.subject.PrincipalCollection; -
- 14 - - 8 - - import org.apache.shiro.subject.Subject; -
- 15 - - 9 - - import sonia.scm.EagerSingleton; -
- 16 - - - import sonia.scm.HandlerEventType; -
- 17 - - - import sonia.scm.event.HandlerEvent; -
- 18 - - 10 - - import sonia.scm.plugin.Extension; -
- 19 - - 11 - - import sonia.scm.repository.Repository; -
- 20 - - 12 - - import sonia.scm.security.SessionId; -
-
-
-
-
-
- - - src/main/js/ChangeNotification.tsx - - - modify - -
-
-
-
- - - - - -
-
- - - - - -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + + + - 6 - - + + + + - - - - - - - - - - - - - - - - - + - - - - - + + - 15 - - + + + - 16 - - + + + - pullRequest: setEvent - - - - + + + - 16 - - + + + + - 17 - - + + + + - }); - - - - + + + - 17 - - + + + + - 18 - - + + + - }, [url]); - - - - + + + + - 19 - - + + + + - const { t } = useTranslation("plugins"); - - - - + + + + - 18 - - + + + + - 20 - - + + + - if (event) { - - - - + + + - 19 - - + + + + - 21 - - + + + + - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 2 - - 2 - - import { Link } from "@scm-manager/ui-types"; -
- 3 - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - 4 - - import { PullRequest } from "./types/PullRequest"; -
+
- 5 - - import { useTranslation } from "react-i18next"; -
- 5 - + 1 + + 1 + + package com.cloudogu.scm.review.events; +
+ 2 + + 2 + + +
- 6 - - 7 - - type HandlerProps = { -
- 7 - - 8 - - url: string; -
-
+ 3 +
-
+ import com.cloudogu.scm.review.comment.service.BasicComment; +
+ 4 + + + import com.cloudogu.scm.review.comment.service.BasicCommentEvent; +
+ 5 + + + import com.cloudogu.scm.review.comment.service.CommentEvent; +
+ 6 + + + import com.cloudogu.scm.review.comment.service.ReplyEvent; +
+ 7 + + 3 + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; +
+ 8 + + 4 + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; +
+ 9 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; +
+ 10 + + 5 + + import com.github.legman.Subscribe; +
+ 11 + + + import lombok.Data; +
- + 12 + + 6 + + import org.apache.shiro.SecurityUtils; +
+ 13 + + 7 + + import org.apache.shiro.subject.PrincipalCollection; +
+ 14 + + 8 + + import org.apache.shiro.subject.Subject; +
+ 15 + + 9 + + import sonia.scm.EagerSingleton; +
+ 16 + + + import sonia.scm.HandlerEventType; +
+ 17 + + + import sonia.scm.event.HandlerEvent; +
+ 18 + + 10 + + import sonia.scm.plugin.Extension; +
+ 19 + + 11 + + import sonia.scm.repository.Repository; +
- 20 - - - <Toast type="warning" title="New Changes"> -
- 21 - - - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> -
- 22 - - - <p>Warning: Non saved modification will be lost.</p> -
- - 22 - - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> -
- - 23 - - <p>{t("scm-review-plugin.changeNotification.description")}</p> -
- - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - 25 - - <ToastButtons> -
- 24 - - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> -
- 25 - - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> -
- - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - 28 - - </ToastButton> -
- - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - 31 - - </ToastButton> -
- 26 - - 32 - - </ToastButtons> -
- 27 - - 33 - - </Toast> -
- 28 - - 34 - - ); -
+ + 20 + + + 12 + + + import sonia.scm.security.SessionId; + + + + +
-
-
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - -
-
- + + + +
+
- - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 2 + + 2 + + import { Link } from "@scm-manager/ui-types"; +
+ 3 + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + 4 + + import { PullRequest } from "./types/PullRequest"; +
+ + 5 + + import { useTranslation } from "react-i18next"; +
+ 5 + + 6 + + +
+ 6 + + 7 + + type HandlerProps = { +
+ 7 + + 8 + + url: string; +
+
+
+ 15 + + 16 + + pullRequest: setEvent +
+ 16 + + 17 + + }); +
+ 17 + + 18 + + }, [url]); +
+ + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + 20 + + if (event) { +
+ 19 + + 21 + + return ( +
+ 20 + + + <Toast type="warning" title="New Changes"> +
+ 21 + + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> +
+ 22 + + + <p>Warning: Non saved modification will be lost.</p> +
+ + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + 25 + + <ToastButtons> +
+ 24 + + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> +
+ 25 + + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> +
+ + 26 + + <ToastButton icon="redo" onClick={reload}> +
+ + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + 28 + + </ToastButton> +
+ + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
+ + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + 31 + + </ToastButton> +
+ 26 + + 32 + + </ToastButtons> +
+ 27 + + 33 + + </Toast> +
+ 28 + + 34 + + ); +
+
- - - - - - - - - - - - - + +
-
- + + + + +
+ - 181 - + - 181 - - "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - + + + + + + +
+ + + + + +
+ + + + +
+ + + + + + + + - 182 - - + + + + + + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ 181 + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
+ 182 + + 182 + + } +
+ 183 + + 183 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "Neue Änderungen", -
- - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Neu laden", -
- - 191 - - "ignore": "Ignorieren" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
- -
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- +
- - - - - -
- +
- - - - - - - - - -
- - - - - - - - - + - 181 - - + + + - 181 - - + + + - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - - - + + + - 182 - - + + + - 182 - - + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + - - - + - 185 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "Neue Änderungen", +
+ + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Neu laden", +
+ + 191 + + "ignore": "Ignorieren" +
+ + 192 + } -
- 183 - - 183 - +
+ 184 + + 193 + } -
- - 184 - +
+ 185 + + 194 + }, -
- +
- "changeNotification": { -
- - 186 - - "title": "New Changes", -
- - 187 - - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", -
- - 188 - - "modificationWarning": "Warning: Non saved modification will be lost.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Reload", -
- - 191 - - "ignore": "Ignore" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
+
+ 186 + + 195 + + "permissions": { +
+
- -
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - -
-
- + + + +
+
- - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 181 + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
+ 182 + + 182 + + } +
+ 183 + + 183 + + } +
+ + 184 + + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "New Changes", +
+ + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
+ + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Reload", +
+ + 191 + + "ignore": "Ignore" +
+ + 192 + + } +
+ 184 + + 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + +
+ + + + + +
+ + + + +
+
- 7 - - 7 - - import org.mockito.Mock; -
- 8 - - 8 - - import org.mockito.junit.jupiter.MockitoExtension; -
- 9 - - 9 - - import sonia.scm.security.SessionId; -
- - 10 - + - -
- 10 - - 11 - - import javax.ws.rs.sse.OutboundSseEvent; -
- 11 - - 12 - - import javax.ws.rs.sse.SseEventSink; -
- 12 - - - -
- 13 - - 13 - - import java.time.Clock; -
- 14 - - 14 - - import java.time.Instant; -
- 15 - - 15 - - import java.time.LocalDateTime; -
- 16 - - 16 - - import java.time.ZoneOffset; -
- 17 - - 17 - - import java.time.temporal.ChronoField; -
- 18 - - - import java.time.temporal.ChronoUnit; -
- 19 - - - import java.time.temporal.TemporalField; -
- 20 - - 18 - - import java.util.concurrent.CompletableFuture; -
- 21 - - 19 - - import java.util.concurrent.CompletionStage; -
- 22 - - - import java.util.concurrent.atomic.AtomicLong; -
- 23 - - 20 - - import java.util.concurrent.atomic.AtomicReference; -
- 24 - - 21 - - -
- 25 - - 22 - - import static java.time.temporal.ChronoUnit.MINUTES; -
- - + + + + + -
+ 7 + +
+ + + + + + + + + + + + + + - - - - - + + + - 83 - - + + + + - 80 - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 7 + + import org.mockito.Mock; +
+ 8 + + 8 + + import org.mockito.junit.jupiter.MockitoExtension; +
+ 9 + + 9 + + import sonia.scm.security.SessionId; +
-
+ 10 + + +
+ 10 + + 11 + + import javax.ws.rs.sse.OutboundSseEvent; +
+ 11 + + 12 + + import javax.ws.rs.sse.SseEventSink; +
- 84 - - 81 - - @Test -
- 85 - - 82 - - @SuppressWarnings("unchecked") -
- 86 - - - void shouldCloseEventSinkOnFailure() throws InterruptedException { -
- - 83 - - void shouldCloseEventSinkOnFailure() { -
- 87 - - 84 - - CompletionStage future = CompletableFuture.supplyAsync(() -> { -
- 88 - - 85 - - throw new RuntimeException("failed to send message"); -
- 89 - - 86 - - }); -
-
+ 12 +
-
+ 13 + + 13 + + import java.time.Clock; +
+ 14 + + 14 + + import java.time.Instant; +
+ 15 + + 15 + + import java.time.LocalDateTime; +
+ 16 + + 16 + + import java.time.ZoneOffset; +
+ 17 + + 17 + + import java.time.temporal.ChronoField; +
+ 18 + + + import java.time.temporal.ChronoUnit; +
+ 19 + + + import java.time.temporal.TemporalField; +
+ 20 + + 18 + + import java.util.concurrent.CompletableFuture; +
+ 21 + + 19 + + import java.util.concurrent.CompletionStage; +
+ 22 + + + import java.util.concurrent.atomic.AtomicLong; +
+ 23 + + 20 + + import java.util.concurrent.atomic.AtomicReference; +
+ 24 + + 21 + + +
+ 25 + + 22 + + import static java.time.temporal.ChronoUnit.MINUTES; +
+
+
+ 83 + + 80 + + +
+ 84 + + 81 + + @Test +
+ 85 + + 82 + + @SuppressWarnings("unchecked") +
+ 86 + + + void shouldCloseEventSinkOnFailure() throws InterruptedException { +
+ + 83 + + void shouldCloseEventSinkOnFailure() { +
+ 87 + + 84 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { +
+ 88 + + 85 + + throw new RuntimeException("failed to send message"); +
+ 89 + + 86 + + }); +
+
+
+ 91 + + 88 + + +
+ 92 + + 89 + + client.send(message); +
+ 93 + + 90 + + +
+ 94 + + + Thread.sleep(50L); +
+ 95 + + + +
+ 96 + + + verify(eventSink).close(); +
+ + 91 + + verify(eventSink, timeout(50L)).close(); +
+ 97 + + 92 + + } +
+ 98 + + 93 + + +
+ 99 + + 94 + + @Test +
+
+ +
+
+
- - - 91 - - - 88 - - - - - - - - 92 - - - 89 - - - client.send(message); - - - - - 93 - - - 90 - - - - - - - - 94 - - - - Thread.sleep(50L); - - - + + modify + +
+
- - 95 - - + + + + + +
+
+ + + + + +
+
+
+ + +
+ + + - - - - - - - + + - - + + + - verify(eventSink, timeout(50L)).close(); - - - - + + + + - 97 - - + + + + - 92 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - -
- -
- 96 - - - verify(eventSink).close(); -
- - 91 - + + 1 + + import java.io.PrintStream; +
+ 1 + + 2 + + import java.util.Arrays; +
+ 2 + + 3 + + +
+ 3 + + 4 + + class Main { +
+ + 5 + + private static final PrintStream OUT = System.out; +
+ + 6 + + +
+ 4 + + 7 + + public static void main(String[] args) { +
+ + 8 + + <<<<<<< HEAD +
+ 5 + + 9 + + System.out.println("Expect nothing more to happen."); +
+ 6 + + 10 + + System.out.println("The command line parameters are:"); +
+ 7 + + 11 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); +
+ + 12 + + ======= +
+ + 13 + + OUT.println("Expect nothing more to happen."); +
+ + 14 + + OUT.println("Parameters:"); +
+ + 15 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); +
+ + 16 + + >>>>>>> feature/use_constant +
+ 8 + + 17 + + } +
+ 9 + + 18 + } -
- 98 - - 93 - - -
- 99 - - 94 - - @Test -
-
- -
-
-
-
- - - Main.java - - - modify - -
-
-
-
- - - - - -
-
- - - - - -
-
-
+ + + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 1 - - import java.io.PrintStream; -
- 1 - - 2 - - import java.util.Arrays; -
- 2 - - 3 - - -
- 3 - - 4 - - class Main { -
- - 5 - - private static final PrintStream OUT = System.out; -
- - 6 - - -
- 4 - - 7 - - public static void main(String[] args) { -
- - 8 - - <<<<<<< HEAD -
- 5 - - 9 - - System.out.println("Expect nothing more to happen."); -
- 6 - - 10 - - System.out.println("The command line parameters are:"); -
- 7 - - 11 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); -
- - 12 - - ======= -
- - 13 - - OUT.println("Expect nothing more to happen."); -
- - 14 - - OUT.println("Parameters:"); -
- - 15 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); -
- - 16 - - >>>>>>> feature/use_constant -
- 8 - - 17 - - } -
- 9 - - 18 - - } -
-
`; @@ -22573,822 +22625,825 @@ exports[`Storyshots Diff Hunks 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/pullrequest/service/DefaultPullRequestService.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/pullrequest/service/DefaultPullRequestService.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + + + - 30 - - + + + + - import static com.cloudogu.scm.review.pullrequest.service.PullRequestStatus.MERGED; - - - - + + + + - 29 - - - - - - - - - - - - - - - - - - + + + - 200 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 29 + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - + + + + - 215 - - + + + + - .filter(recipient -> user.getId().equals(recipient)) - - - + 202 + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - + + + + - .ifPresent(pullRequest::removeApprover); - - - - + + + + - 215 - - + + + + - getStore(repository).update(pullRequest); - - - - + + + - 217 - - + + + - .ifPresent( - - - - + + + - 218 - - + + + - approval -> { - - - - + + + - 219 - - + + + - pullRequest.removeApprover(approval); - - - - + + + - 220 - - + + + - getStore(repository).update(pullRequest); - - - - + + + + - 221 - - + + + + - eventBus.post(new PullRequestApprovalEvent(repository, pullRequest, APPROVAL_REMOVED)); - - - - - - - - - - - - - - - - - - - - - - -
- 25 - - 25 - - import java.util.Set; -
- 26 - - 26 - - import java.util.stream.Collectors; -
- 27 - - 27 - - -
+
- 28 - - import static com.cloudogu.scm.review.pullrequest.service.PullRequestApprovalEvent.ApprovalCause.APPROVAL_REMOVED; -
- - 29 - - import static com.cloudogu.scm.review.pullrequest.service.PullRequestApprovalEvent.ApprovalCause.APPROVED; -
- 28 - + 25 + + 25 + + import java.util.Set; +
+ 26 + + 26 + + import java.util.stream.Collectors; +
+ 27 + + 27 + + +
- 31 - - import static com.cloudogu.scm.review.pullrequest.service.PullRequestStatus.OPEN; -
- 30 - - 32 - - import static com.cloudogu.scm.review.pullrequest.service.PullRequestStatus.REJECTED; -
-
-
+ 28 + + import static com.cloudogu.scm.review.pullrequest.service.PullRequestApprovalEvent.ApprovalCause.APPROVAL_REMOVED; +
- 202 - - PullRequest pullRequest = getPullRequestFromStore(repository, pullRequestId); -
- 201 - - 203 - - pullRequest.addApprover(user.getId()); -
- 202 - - 204 - - getStore(repository).update(pullRequest); -
- - 205 - - eventBus.post(new PullRequestApprovalEvent(repository, pullRequest, APPROVED)); -
- 203 - - 206 - - } -
- 204 - - 207 - - -
- 205 - - 208 - - @Override -
-
-
+ import static com.cloudogu.scm.review.pullrequest.service.PullRequestApprovalEvent.ApprovalCause.APPROVED; +
+ 28 + + 30 + + import static com.cloudogu.scm.review.pullrequest.service.PullRequestStatus.MERGED; +
+ 29 + + 31 + + import static com.cloudogu.scm.review.pullrequest.service.PullRequestStatus.OPEN; +
+ 30 + + 32 + + import static com.cloudogu.scm.review.pullrequest.service.PullRequestStatus.REJECTED; +
- 211 - - 214 - - approver.stream() -
+
+
- 212 - + 200 + + 202 + + PullRequest pullRequest = getPullRequestFromStore(repository, pullRequestId); +
+ 201 + + 203 + + pullRequest.addApprover(user.getId()); +
+ 204 + + getStore(repository).update(pullRequest); +
+ + 205 + + eventBus.post(new PullRequestApprovalEvent(repository, pullRequest, APPROVED)); +
+ 203 + + 206 + + } +
+ 204 + + 207 + + +
+ 205 + + 208 + + @Override +
- 213 - - 216 - - .findFirst() -
+
+
- 214 - - + 211 + + 214 + + approver.stream() +
+ 212 + + 215 + + .filter(recipient -> user.getId().equals(recipient)) +
- + 213 + + 216 + + .findFirst() +
- + 214 + + + .ifPresent(pullRequest::removeApprover); +
+ 215 + + + getStore(repository).update(pullRequest); +
- + + 217 + + .ifPresent( +
+ + 218 + + approval -> { +
- + + 219 + + pullRequest.removeApprover(approval); +
+ + 220 + + getStore(repository).update(pullRequest); +
- + + 221 + + eventBus.post(new PullRequestApprovalEvent(repository, pullRequest, APPROVAL_REMOVED)); +
+ + 222 + + }); +
- + 216 + + 223 + + } +
+ 217 + + 224 + + +
- - 222 - - }); -
- 216 - - 223 - - } -
- 217 - - 224 - - -
- 218 - - 225 - - @Override -
+ + 218 + + + 225 + + + @Override + + + + +
@@ -23398,3870 +23453,3878 @@ exports[`Storyshots Diff Line Annotation 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 1 - - 1 - - package com.cloudogu.scm.review.events; -
- 2 - - 2 - - -
-

- Line Annotation -

-
- 3 - - - import com.cloudogu.scm.review.comment.service.BasicComment; -
- 4 - - - import com.cloudogu.scm.review.comment.service.BasicCommentEvent; -
- 5 - - - import com.cloudogu.scm.review.comment.service.CommentEvent; -
- 6 - - - import com.cloudogu.scm.review.comment.service.ReplyEvent; -
- 7 - - 3 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; -
- 8 - - 4 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; -
- 9 - - - import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; -
- 10 - - 5 - - import com.github.legman.Subscribe; -
- 11 - - - import lombok.Data; -
- 12 - - 6 - - import org.apache.shiro.SecurityUtils; -
- 13 - - 7 - - import org.apache.shiro.subject.PrincipalCollection; -
- 14 - - 8 - - import org.apache.shiro.subject.Subject; -
- 15 - - 9 - - import sonia.scm.EagerSingleton; -
- 16 - - - import sonia.scm.HandlerEventType; -
- 17 - - - import sonia.scm.event.HandlerEvent; -
- 18 - - 10 - - import sonia.scm.plugin.Extension; -
- 19 - - 11 - - import sonia.scm.repository.Repository; -
- 20 - - 12 - - import sonia.scm.security.SessionId; -
-
-
-
-
-
- - - src/main/js/ChangeNotification.tsx - - - modify - -
-
-
-
- - - - - -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + + + - 6 - - + + + + - - - - - + + - 6 - - - - - - - - - - - - - + - - - - - + + - 15 - - + + + - 16 - - + + + - pullRequest: setEvent - - - - + + + - 16 - - + + + + - 17 - - + + + + - }); - - - - + + + - 17 - - + + + + - 18 - - + + + - }, [url]); - - - - + + + + - 19 - - + + + + - const { t } = useTranslation("plugins"); - - - - + + + + - 18 - - + + + + - 20 - - + + + - if (event) { - - - - + + + - 19 - - + + + + - 21 - - + + + + - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 2 - - 2 - - import { Link } from "@scm-manager/ui-types"; -
-

- Line Annotation -

-
- 3 - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - 4 - - import { PullRequest } from "./types/PullRequest"; -
+
- 5 - - import { useTranslation } from "react-i18next"; -
- 5 - + 1 + + 1 + + package com.cloudogu.scm.review.events; +
+ 2 + + 2 + + +
+

+ Line Annotation +

+
- 7 - - type HandlerProps = { -
- 7 - - 8 - - url: string; -
-
+ 3 +
-
+ import com.cloudogu.scm.review.comment.service.BasicComment; +
+ 4 + + + import com.cloudogu.scm.review.comment.service.BasicCommentEvent; +
+ 5 + + + import com.cloudogu.scm.review.comment.service.CommentEvent; +
+ 6 + + + import com.cloudogu.scm.review.comment.service.ReplyEvent; +
+ 7 + + 3 + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; +
+ 8 + + 4 + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; +
+ 9 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; +
+ 10 + + 5 + + import com.github.legman.Subscribe; +
+ 11 + + + import lombok.Data; +
- + 12 + + 6 + + import org.apache.shiro.SecurityUtils; +
+ 13 + + 7 + + import org.apache.shiro.subject.PrincipalCollection; +
+ 14 + + 8 + + import org.apache.shiro.subject.Subject; +
+ 15 + + 9 + + import sonia.scm.EagerSingleton; +
+ 16 + + + import sonia.scm.HandlerEventType; +
+ 17 + + + import sonia.scm.event.HandlerEvent; +
+ 18 + + 10 + + import sonia.scm.plugin.Extension; +
+ 19 + + 11 + + import sonia.scm.repository.Repository; +
- 20 - - - <Toast type="warning" title="New Changes"> -
- 21 - - - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> -
- 22 - - - <p>Warning: Non saved modification will be lost.</p> -
- - 22 - - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> -
- - 23 - - <p>{t("scm-review-plugin.changeNotification.description")}</p> -
- - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - 25 - - <ToastButtons> -
- 24 - - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> -
- 25 - - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> -
- - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - 28 - - </ToastButton> -
- - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - 31 - - </ToastButton> -
- 26 - - 32 - - </ToastButtons> -
- 27 - - 33 - - </Toast> -
- 28 - - 34 - - ); -
+ + 20 + + + 12 + + + import sonia.scm.security.SessionId; + + + + +
-
-
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 2 + + 2 + + import { Link } from "@scm-manager/ui-types"; +
+

+ Line Annotation +

+
+ 3 + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + 4 + + import { PullRequest } from "./types/PullRequest"; +
+ + 5 + + import { useTranslation } from "react-i18next"; +
+ 5 + + 6 + + +
+ 6 + + 7 + + type HandlerProps = { +
+ 7 + + 8 + + url: string; +
+
+
+ 15 + + 16 + + pullRequest: setEvent +
+ 16 + + 17 + + }); +
+ 17 + + 18 + + }, [url]); +
+ + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + 20 + + if (event) { +
+ 19 + + 21 + + return ( +
+ 20 + + + <Toast type="warning" title="New Changes"> +
+ 21 + + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> +
+ 22 + + + <p>Warning: Non saved modification will be lost.</p> +
+ + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + 25 + + <ToastButtons> +
+ 24 + + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> +
+ 25 + + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> +
+ + 26 + + <ToastButton icon="redo" onClick={reload}> +
+ + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + 28 + + </ToastButton> +
+ + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
+ + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + 31 + + </ToastButton> +
+ 26 + + 32 + + </ToastButtons> +
+ 27 + + 33 + + </Toast> +
+ 28 + + 34 + + ); +
+
- - - - - - - - - - - - - + +
-
- + + + + +
+ - 181 - + - 181 - - "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - + + + + + + + + + + +
+ + + + + + + + - 182 - - + + + + + + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ 181 + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
+ 182 + + 182 + + } +
+ 183 + + 183 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "Neue Änderungen", -
- - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Neu laden", -
- - 191 - - "ignore": "Ignorieren" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
- -
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- +
- - - - - - - - - -
- - - - - - - - - + + - 181 - - + + + - 181 - - + + + - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - - - + + + - 182 - - + + + - 182 - - + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + - - - + - 185 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "Neue Änderungen", +
+ + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Neu laden", +
+ + 191 + + "ignore": "Ignorieren" +
+ + 192 + } -
- 183 - - 183 - +
+ 184 + + 193 + } -
- - 184 - +
+ 185 + + 194 + }, -
- +
- "changeNotification": { -
- - 186 - - "title": "New Changes", -
- - 187 - - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", -
- - 188 - - "modificationWarning": "Warning: Non saved modification will be lost.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Reload", -
- - 191 - - "ignore": "Ignore" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
+
+ 186 + + 195 + + "permissions": { +
+
- -
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 181 + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
+ 182 + + 182 + + } +
+ 183 + + 183 + + } +
+ + 184 + + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "New Changes", +
+ + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
+ + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Reload", +
+ + 191 + + "ignore": "Ignore" +
+ + 192 + + } +
+ 184 + + 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + +
+
- 7 - - 7 - - import org.mockito.Mock; -
- 8 - - 8 - - import org.mockito.junit.jupiter.MockitoExtension; -
- 9 - - 9 - - import sonia.scm.security.SessionId; -
- - 10 - + - -
- 10 - - 11 - - import javax.ws.rs.sse.OutboundSseEvent; -
- 11 - - 12 - - import javax.ws.rs.sse.SseEventSink; -
- 12 - - - -
- 13 - - 13 - - import java.time.Clock; -
- 14 - - 14 - - import java.time.Instant; -
- 15 - - 15 - - import java.time.LocalDateTime; -
- 16 - - 16 - - import java.time.ZoneOffset; -
- 17 - - 17 - - import java.time.temporal.ChronoField; -
- 18 - - - import java.time.temporal.ChronoUnit; -
- 19 - - - import java.time.temporal.TemporalField; -
- 20 - - 18 - - import java.util.concurrent.CompletableFuture; -
- 21 - - 19 - - import java.util.concurrent.CompletionStage; -
- 22 - - - import java.util.concurrent.atomic.AtomicLong; -
- 23 - - 20 - - import java.util.concurrent.atomic.AtomicReference; -
- 24 - - 21 - - -
- 25 - - 22 - - import static java.time.temporal.ChronoUnit.MINUTES; -
- - + + + + + -
+ 7 + +
+ + + + + + + + + + + + + + - - - - - + + + - 83 - - + + + + - 80 - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 7 + + import org.mockito.Mock; +
+ 8 + + 8 + + import org.mockito.junit.jupiter.MockitoExtension; +
+ 9 + + 9 + + import sonia.scm.security.SessionId; +
-
+ 10 + + +
+ 10 + + 11 + + import javax.ws.rs.sse.OutboundSseEvent; +
+ 11 + + 12 + + import javax.ws.rs.sse.SseEventSink; +
- 84 - - 81 - - @Test -
- 85 - - 82 - - @SuppressWarnings("unchecked") -
- 86 - - - void shouldCloseEventSinkOnFailure() throws InterruptedException { -
- - 83 - - void shouldCloseEventSinkOnFailure() { -
- 87 - - 84 - - CompletionStage future = CompletableFuture.supplyAsync(() -> { -
- 88 - - 85 - - throw new RuntimeException("failed to send message"); -
- 89 - - 86 - - }); -
-
+ 12 +
-
+ 13 + + 13 + + import java.time.Clock; +
+ 14 + + 14 + + import java.time.Instant; +
+ 15 + + 15 + + import java.time.LocalDateTime; +
+ 16 + + 16 + + import java.time.ZoneOffset; +
+ 17 + + 17 + + import java.time.temporal.ChronoField; +
+ 18 + + + import java.time.temporal.ChronoUnit; +
+ 19 + + + import java.time.temporal.TemporalField; +
+ 20 + + 18 + + import java.util.concurrent.CompletableFuture; +
+ 21 + + 19 + + import java.util.concurrent.CompletionStage; +
+ 22 + + + import java.util.concurrent.atomic.AtomicLong; +
+ 23 + + 20 + + import java.util.concurrent.atomic.AtomicReference; +
+ 24 + + 21 + + +
+ 25 + + 22 + + import static java.time.temporal.ChronoUnit.MINUTES; +
+
+
+ 83 + + 80 + + +
+ 84 + + 81 + + @Test +
+ 85 + + 82 + + @SuppressWarnings("unchecked") +
+ 86 + + + void shouldCloseEventSinkOnFailure() throws InterruptedException { +
+ + 83 + + void shouldCloseEventSinkOnFailure() { +
+ 87 + + 84 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { +
+ 88 + + 85 + + throw new RuntimeException("failed to send message"); +
+ 89 + + 86 + + }); +
+
+
+ 91 + + 88 + + +
+ 92 + + 89 + + client.send(message); +
+ 93 + + 90 + + +
+ 94 + + + Thread.sleep(50L); +
+ 95 + + + +
+ 96 + + + verify(eventSink).close(); +
+ + 91 + + verify(eventSink, timeout(50L)).close(); +
+ 97 + + 92 + + } +
+ 98 + + 93 + + +
+ 99 + + 94 + + @Test +
+
+ +
+
+
- - - 91 - - - 88 - - - - - - - - 92 - - - 89 - - - client.send(message); - - - - - 93 - - - 90 - - - - - - - - 94 - - - - Thread.sleep(50L); - - - + + modify + +
+
- - 95 - - + + + + + +
+
+
+ + +
+ + + - - - - - - - + + - - + + + - verify(eventSink, timeout(50L)).close(); - - - - + + + + - 97 - - + + + + - 92 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - -
- -
- 96 - - - verify(eventSink).close(); -
- - 91 - + + 1 + + import java.io.PrintStream; +
+ 1 + + 2 + + import java.util.Arrays; +
+ 2 + + 3 + + +
+

+ Line Annotation +

+
+ 3 + + 4 + + class Main { +
+ + 5 + + private static final PrintStream OUT = System.out; +
+ + 6 + + +
+ 4 + + 7 + + public static void main(String[] args) { +
+ + 8 + + <<<<<<< HEAD +
+ 5 + + 9 + + System.out.println("Expect nothing more to happen."); +
+ 6 + + 10 + + System.out.println("The command line parameters are:"); +
+ 7 + + 11 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); +
+ + 12 + + ======= +
+ + 13 + + OUT.println("Expect nothing more to happen."); +
+ + 14 + + OUT.println("Parameters:"); +
+ + 15 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); +
+ + 16 + + >>>>>>> feature/use_constant +
+ 8 + + 17 + + } +
+ 9 + + 18 + } -
- 98 - - 93 - - -
- 99 - - 94 - - @Test -
-
- -
-
-
-
- - - Main.java - - - modify - -
-
-
-
- - - - - -
-
-
+ + + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 1 - - import java.io.PrintStream; -
- 1 - - 2 - - import java.util.Arrays; -
- 2 - - 3 - - -
-

- Line Annotation -

-
- 3 - - 4 - - class Main { -
- - 5 - - private static final PrintStream OUT = System.out; -
- - 6 - - -
- 4 - - 7 - - public static void main(String[] args) { -
- - 8 - - <<<<<<< HEAD -
- 5 - - 9 - - System.out.println("Expect nothing more to happen."); -
- 6 - - 10 - - System.out.println("The command line parameters are:"); -
- 7 - - 11 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); -
- - 12 - - ======= -
- - 13 - - OUT.println("Expect nothing more to happen."); -
- - 14 - - OUT.println("Parameters:"); -
- - 15 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); -
- - 16 - - >>>>>>> feature/use_constant -
- 8 - - 17 - - } -
- 9 - - 18 - - } -
-
`; @@ -27270,4108 +27333,4116 @@ exports[`Storyshots Diff OnClick 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 1 - - 1 - - package com.cloudogu.scm.review.events; -
- 2 - - 2 - - -
- 3 - - - import com.cloudogu.scm.review.comment.service.BasicComment; -
- 4 - - - import com.cloudogu.scm.review.comment.service.BasicCommentEvent; -
- 5 - - - import com.cloudogu.scm.review.comment.service.CommentEvent; -
- 6 - - - import com.cloudogu.scm.review.comment.service.ReplyEvent; -
- 7 - - 3 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; -
- 8 - - 4 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; -
- 9 - - - import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; -
- 10 - - 5 - - import com.github.legman.Subscribe; -
- 11 - - - import lombok.Data; -
- 12 - - 6 - - import org.apache.shiro.SecurityUtils; -
- 13 - - 7 - - import org.apache.shiro.subject.PrincipalCollection; -
- 14 - - 8 - - import org.apache.shiro.subject.Subject; -
- 15 - - 9 - - import sonia.scm.EagerSingleton; -
- 16 - - - import sonia.scm.HandlerEventType; -
- 17 - - - import sonia.scm.event.HandlerEvent; -
- 18 - - 10 - - import sonia.scm.plugin.Extension; -
- 19 - - 11 - - import sonia.scm.repository.Repository; -
- 20 - - 12 - - import sonia.scm.security.SessionId; -
-
-
-
-
-
- - - src/main/js/ChangeNotification.tsx - - - modify - -
-
-
-
- - - - - -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + + + - 6 - - + + + + - - - - - - - - - - - - - - - - - + - - - - - + + - 15 - - + + + - 16 - - + + + - pullRequest: setEvent - - - - + + + - 16 - - + + + + - 17 - - + + + + - }); - - - - + + + - 17 - - + + + + - 18 - - + + + - }, [url]); - - - - + + + + - 19 - - + + + + - const { t } = useTranslation("plugins"); - - - - + + + + - 18 - - + + + + - 20 - - + + + - if (event) { - - - - + + + - 19 - - + + + + - 21 - - + + + + - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 2 - - 2 - - import { Link } from "@scm-manager/ui-types"; -
- 3 - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - 4 - - import { PullRequest } from "./types/PullRequest"; -
+
- 5 - - import { useTranslation } from "react-i18next"; -
- 5 - + 1 + + 1 + + package com.cloudogu.scm.review.events; +
+ 2 + + 2 + + +
- 6 - - 7 - - type HandlerProps = { -
- 7 - - 8 - - url: string; -
-
+ 3 +
-
+ import com.cloudogu.scm.review.comment.service.BasicComment; +
+ 4 + + + import com.cloudogu.scm.review.comment.service.BasicCommentEvent; +
+ 5 + + + import com.cloudogu.scm.review.comment.service.CommentEvent; +
+ 6 + + + import com.cloudogu.scm.review.comment.service.ReplyEvent; +
+ 7 + + 3 + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; +
+ 8 + + 4 + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; +
+ 9 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; +
+ 10 + + 5 + + import com.github.legman.Subscribe; +
+ 11 + + + import lombok.Data; +
- + 12 + + 6 + + import org.apache.shiro.SecurityUtils; +
+ 13 + + 7 + + import org.apache.shiro.subject.PrincipalCollection; +
+ 14 + + 8 + + import org.apache.shiro.subject.Subject; +
+ 15 + + 9 + + import sonia.scm.EagerSingleton; +
+ 16 + + + import sonia.scm.HandlerEventType; +
+ 17 + + + import sonia.scm.event.HandlerEvent; +
+ 18 + + 10 + + import sonia.scm.plugin.Extension; +
+ 19 + + 11 + + import sonia.scm.repository.Repository; +
- 20 - - - <Toast type="warning" title="New Changes"> -
- 21 - - - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> -
- 22 - - - <p>Warning: Non saved modification will be lost.</p> -
- - 22 - - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> -
- - 23 - - <p>{t("scm-review-plugin.changeNotification.description")}</p> -
- - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - 25 - - <ToastButtons> -
- 24 - - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> -
- 25 - - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> -
- - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - 28 - - </ToastButton> -
- - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - 31 - - </ToastButton> -
- 26 - - 32 - - </ToastButtons> -
- 27 - - 33 - - </Toast> -
- 28 - - 34 - - ); -
+ + 20 + + + 12 + + + import sonia.scm.security.SessionId; + + + + +
-
-
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 2 + + 2 + + import { Link } from "@scm-manager/ui-types"; +
+ 3 + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + 4 + + import { PullRequest } from "./types/PullRequest"; +
+ + 5 + + import { useTranslation } from "react-i18next"; +
+ 5 + + 6 + + +
+ 6 + + 7 + + type HandlerProps = { +
+ 7 + + 8 + + url: string; +
+
+
+ 15 + + 16 + + pullRequest: setEvent +
+ 16 + + 17 + + }); +
+ 17 + + 18 + + }, [url]); +
+ + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + 20 + + if (event) { +
+ 19 + + 21 + + return ( +
+ 20 + + + <Toast type="warning" title="New Changes"> +
+ 21 + + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> +
+ 22 + + + <p>Warning: Non saved modification will be lost.</p> +
+ + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + 25 + + <ToastButtons> +
+ 24 + + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> +
+ 25 + + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> +
+ + 26 + + <ToastButton icon="redo" onClick={reload}> +
+ + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + 28 + + </ToastButton> +
+ + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
+ + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + 31 + + </ToastButton> +
+ 26 + + 32 + + </ToastButtons> +
+ 27 + + 33 + + </Toast> +
+ 28 + + 34 + + ); +
+
- - - - - - - - - - - - - + +
-
- + + + + +
+ - 181 - + - 181 - - "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - + + + + + + + + + + +
+ + + + + + + + - 182 - - + + + + + + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ 181 + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
+ 182 + + 182 + + } +
+ 183 + + 183 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "Neue Änderungen", -
- - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Neu laden", -
- - 191 - - "ignore": "Ignorieren" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
- -
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- +
- - - - - - - - - -
- - - - - - - - - + + - 181 - - + + + - 181 - - + + + - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - - - + + + - 182 - - + + + - 182 - - + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + - - - + - 185 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "Neue Änderungen", +
+ + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Neu laden", +
+ + 191 + + "ignore": "Ignorieren" +
+ + 192 + } -
- 183 - - 183 - +
+ 184 + + 193 + } -
- - 184 - +
+ 185 + + 194 + }, -
- +
- "changeNotification": { -
- - 186 - - "title": "New Changes", -
- - 187 - - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", -
- - 188 - - "modificationWarning": "Warning: Non saved modification will be lost.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Reload", -
- - 191 - - "ignore": "Ignore" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
+
+ 186 + + 195 + + "permissions": { +
+
- -
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 181 + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
+ 182 + + 182 + + } +
+ 183 + + 183 + + } +
+ + 184 + + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "New Changes", +
+ + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
+ + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Reload", +
+ + 191 + + "ignore": "Ignore" +
+ + 192 + + } +
+ 184 + + 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + +
+
- 7 - - 7 - - import org.mockito.Mock; -
- 8 - - 8 - - import org.mockito.junit.jupiter.MockitoExtension; -
- 9 - - 9 - - import sonia.scm.security.SessionId; -
- - 10 - + - -
- 10 - - 11 - - import javax.ws.rs.sse.OutboundSseEvent; -
- 11 - - 12 - - import javax.ws.rs.sse.SseEventSink; -
- 12 - - - -
- 13 - - 13 - - import java.time.Clock; -
- 14 - - 14 - - import java.time.Instant; -
- 15 - - 15 - - import java.time.LocalDateTime; -
- 16 - - 16 - - import java.time.ZoneOffset; -
- 17 - - 17 - - import java.time.temporal.ChronoField; -
- 18 - - - import java.time.temporal.ChronoUnit; -
- 19 - - - import java.time.temporal.TemporalField; -
- 20 - - 18 - - import java.util.concurrent.CompletableFuture; -
- 21 - - 19 - - import java.util.concurrent.CompletionStage; -
- 22 - - - import java.util.concurrent.atomic.AtomicLong; -
- 23 - - 20 - - import java.util.concurrent.atomic.AtomicReference; -
- 24 - - 21 - - -
- 25 - - 22 - - import static java.time.temporal.ChronoUnit.MINUTES; -
- - + + + + + -
+ 7 + +
+ + + + + + + + + + + + + + - - - - - + + + - 83 - - + + + + - 80 - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 7 + + import org.mockito.Mock; +
+ 8 + + 8 + + import org.mockito.junit.jupiter.MockitoExtension; +
+ 9 + + 9 + + import sonia.scm.security.SessionId; +
-
+ 10 + + +
+ 10 + + 11 + + import javax.ws.rs.sse.OutboundSseEvent; +
+ 11 + + 12 + + import javax.ws.rs.sse.SseEventSink; +
- 84 - - 81 - - @Test -
- 85 - - 82 - - @SuppressWarnings("unchecked") -
- 86 - - - void shouldCloseEventSinkOnFailure() throws InterruptedException { -
- - 83 - - void shouldCloseEventSinkOnFailure() { -
- 87 - - 84 - - CompletionStage future = CompletableFuture.supplyAsync(() -> { -
- 88 - - 85 - - throw new RuntimeException("failed to send message"); -
- 89 - - 86 - - }); -
-
+ 12 +
-
+ 13 + + 13 + + import java.time.Clock; +
+ 14 + + 14 + + import java.time.Instant; +
+ 15 + + 15 + + import java.time.LocalDateTime; +
+ 16 + + 16 + + import java.time.ZoneOffset; +
+ 17 + + 17 + + import java.time.temporal.ChronoField; +
+ 18 + + + import java.time.temporal.ChronoUnit; +
+ 19 + + + import java.time.temporal.TemporalField; +
+ 20 + + 18 + + import java.util.concurrent.CompletableFuture; +
+ 21 + + 19 + + import java.util.concurrent.CompletionStage; +
+ 22 + + + import java.util.concurrent.atomic.AtomicLong; +
+ 23 + + 20 + + import java.util.concurrent.atomic.AtomicReference; +
+ 24 + + 21 + + +
+ 25 + + 22 + + import static java.time.temporal.ChronoUnit.MINUTES; +
+
+
+ 83 + + 80 + + +
+ 84 + + 81 + + @Test +
+ 85 + + 82 + + @SuppressWarnings("unchecked") +
+ 86 + + + void shouldCloseEventSinkOnFailure() throws InterruptedException { +
+ + 83 + + void shouldCloseEventSinkOnFailure() { +
+ 87 + + 84 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { +
+ 88 + + 85 + + throw new RuntimeException("failed to send message"); +
+ 89 + + 86 + + }); +
+
+
+ 91 + + 88 + + +
+ 92 + + 89 + + client.send(message); +
+ 93 + + 90 + + +
+ 94 + + + Thread.sleep(50L); +
+ 95 + + + +
+ 96 + + + verify(eventSink).close(); +
+ + 91 + + verify(eventSink, timeout(50L)).close(); +
+ 97 + + 92 + + } +
+ 98 + + 93 + + +
+ 99 + + 94 + + @Test +
+
+ +
+
+
- - - 91 - - - 88 - - - - - - - - 92 - - - 89 - - - client.send(message); - - - - - 93 - - - 90 - - - - - - - - 94 - - - - Thread.sleep(50L); - - - + + modify + +
+
- - 95 - - + + + + + +
+
+
+ + +
+ + + - - - - - - - + + - - + + + - verify(eventSink, timeout(50L)).close(); - - - - + + + + - 97 - - + + + + - 92 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - -
- -
- 96 - - - verify(eventSink).close(); -
- - 91 - + + 1 + + import java.io.PrintStream; +
+ 1 + + 2 + + import java.util.Arrays; +
+ 2 + + 3 + + +
+ 3 + + 4 + + class Main { +
+ + 5 + + private static final PrintStream OUT = System.out; +
+ + 6 + + +
+ 4 + + 7 + + public static void main(String[] args) { +
+ + 8 + + <<<<<<< HEAD +
+ 5 + + 9 + + System.out.println("Expect nothing more to happen."); +
+ 6 + + 10 + + System.out.println("The command line parameters are:"); +
+ 7 + + 11 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); +
+ + 12 + + ======= +
+ + 13 + + OUT.println("Expect nothing more to happen."); +
+ + 14 + + OUT.println("Parameters:"); +
+ + 15 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); +
+ + 16 + + >>>>>>> feature/use_constant +
+ 8 + + 17 + + } +
+ 9 + + 18 + } -
- 98 - - 93 - - -
- 99 - - 94 - - @Test -
-
- -
-
-
-
- - - Main.java - - - modify - -
-
-
-
- - - - - -
-
-
+ + + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 1 - - import java.io.PrintStream; -
- 1 - - 2 - - import java.util.Arrays; -
- 2 - - 3 - - -
- 3 - - 4 - - class Main { -
- - 5 - - private static final PrintStream OUT = System.out; -
- - 6 - - -
- 4 - - 7 - - public static void main(String[] args) { -
- - 8 - - <<<<<<< HEAD -
- 5 - - 9 - - System.out.println("Expect nothing more to happen."); -
- 6 - - 10 - - System.out.println("The command line parameters are:"); -
- 7 - - 11 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); -
- - 12 - - ======= -
- - 13 - - OUT.println("Expect nothing more to happen."); -
- - 14 - - OUT.println("Parameters:"); -
- - 15 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); -
- - 16 - - >>>>>>> feature/use_constant -
- 8 - - 17 - - } -
- 9 - - 18 - - } -
-
`; @@ -31380,4362 +31451,4370 @@ exports[`Storyshots Diff Side-By-Side 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 1 - - package com.cloudogu.scm.review.events; - - 1 - - package com.cloudogu.scm.review.events; -
- 2 - - - - 2 - - -
- 3 - - import com.cloudogu.scm.review.comment.service.BasicComment; - - -
- 4 - - import com.cloudogu.scm.review.comment.service.BasicCommentEvent; - - -
- 5 - - import com.cloudogu.scm.review.comment.service.CommentEvent; - - -
- 6 - - import com.cloudogu.scm.review.comment.service.ReplyEvent; - - -
- 7 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; - - 3 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; -
- 8 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; - - 4 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; -
- 9 - - import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; - - -
- 10 - - import com.github.legman.Subscribe; - - 5 - - import com.github.legman.Subscribe; -
- 11 - - import lombok.Data; - - -
- 12 - - import org.apache.shiro.SecurityUtils; - - 6 - - import org.apache.shiro.SecurityUtils; -
- 13 - - import org.apache.shiro.subject.PrincipalCollection; - - 7 - - import org.apache.shiro.subject.PrincipalCollection; -
- 14 - - import org.apache.shiro.subject.Subject; - - 8 - - import org.apache.shiro.subject.Subject; -
- 15 - - import sonia.scm.EagerSingleton; - - 9 - - import sonia.scm.EagerSingleton; -
- 16 - - import sonia.scm.HandlerEventType; - - -
- 17 - - import sonia.scm.event.HandlerEvent; - - -
- 18 - - import sonia.scm.plugin.Extension; - - 10 - - import sonia.scm.plugin.Extension; -
- 19 - - import sonia.scm.repository.Repository; - - 11 - - import sonia.scm.repository.Repository; -
- 20 - - import sonia.scm.security.SessionId; - - 12 - - import sonia.scm.security.SessionId; -
-
-
-
-
-
- - + + + + + + - src/main/js/ChangeNotification.tsx - - - modify - -
-
-
-
- - - - - -
-
-
-
-
-
- - - - - - - - - - + + + + - 2 - - + + + + + - import { Link } from "@scm-manager/ui-types"; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + package com.cloudogu.scm.review.events; + + 1 + + package com.cloudogu.scm.review.events; +
+ 2 + + + + 2 + + +
- 2 - - import { Link } from "@scm-manager/ui-types"; -
- 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - import { PullRequest } from "./types/PullRequest"; - - 4 - - import { PullRequest } from "./types/PullRequest"; -
- - - 5 - - import { useTranslation } from "react-i18next"; -
- 5 - - - - 6 - - -
- 6 - - type HandlerProps = { - - 7 - - type HandlerProps = { -
- 7 - - url: string; - - 8 - - url: string; -
-
+ 3 +
+ import com.cloudogu.scm.review.comment.service.BasicComment; + -
- 15 - - pullRequest: setEvent - - 16 - - pullRequest: setEvent -
- 16 - - }); - - 17 - - }); -
- 17 - - }, [url]); - - 18 - - }, [url]); -
- - - 19 - - const { t } = useTranslation("plugins"); -
- 18 - - if (event) { - - 20 - - if (event) { -
- 19 - - return ( - - 21 - - return ( -
- 20 - - <Toast type="warning" title="New Changes"> - - -
- 21 - - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> - - -
- 22 - - <p>Warning: Non saved modification will be lost.</p> - - 22 - - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> -
- - - 23 - - <p>{t("scm-review-plugin.changeNotification.description")}</p> -
- - - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - <ToastButtons> - - 25 - - <ToastButtons> -
- 24 - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> - - -
- 25 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> - - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - - 28 - - </ToastButton> -
- - - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - - 31 - - </ToastButton> -
- 26 - - </ToastButtons> - - 32 - - </ToastButtons> -
- 27 - - </Toast> - - 33 - - </Toast> -
- 28 - - ); - - 34 - - ); -
+ + + + + 4 + + + import com.cloudogu.scm.review.comment.service.BasicCommentEvent; + + + + + + + 5 + + + import com.cloudogu.scm.review.comment.service.CommentEvent; + + + + + + + 6 + + + import com.cloudogu.scm.review.comment.service.ReplyEvent; + + + + + + + 7 + + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; + + + 3 + + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; + + + + + 8 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; + + + 4 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; + + + + + 9 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; + + + + + + + 10 + + + import com.github.legman.Subscribe; + + + 5 + + + import com.github.legman.Subscribe; + + + + + 11 + + + import lombok.Data; + + + + + + + 12 + + + import org.apache.shiro.SecurityUtils; + + + 6 + + + import org.apache.shiro.SecurityUtils; + + + + + 13 + + + import org.apache.shiro.subject.PrincipalCollection; + + + 7 + + + import org.apache.shiro.subject.PrincipalCollection; + + + + + 14 + + + import org.apache.shiro.subject.Subject; + + + 8 + + + import org.apache.shiro.subject.Subject; + + + + + 15 + + + import sonia.scm.EagerSingleton; + + + 9 + + + import sonia.scm.EagerSingleton; + + + + + 16 + + + import sonia.scm.HandlerEventType; + + + + + + + 17 + + + import sonia.scm.event.HandlerEvent; + + + + + + + 18 + + + import sonia.scm.plugin.Extension; + + + 10 + + + import sonia.scm.plugin.Extension; + + + + + 19 + + + import sonia.scm.repository.Repository; + + + 11 + + + import sonia.scm.repository.Repository; + + + + + 20 + + + import sonia.scm.security.SessionId; + + + 12 + + + import sonia.scm.security.SessionId; + + + + +
-
-
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 2 + + import { Link } from "@scm-manager/ui-types"; + + 2 + + import { Link } from "@scm-manager/ui-types"; +
+ 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + import { PullRequest } from "./types/PullRequest"; + + 4 + + import { PullRequest } from "./types/PullRequest"; +
+ + + 5 + + import { useTranslation } from "react-i18next"; +
+ 5 + + + + 6 + + +
+ 6 + + type HandlerProps = { + + 7 + + type HandlerProps = { +
+ 7 + + url: string; + + 8 + + url: string; +
+
+
+ 15 + + pullRequest: setEvent + + 16 + + pullRequest: setEvent +
+ 16 + + }); + + 17 + + }); +
+ 17 + + }, [url]); + + 18 + + }, [url]); +
+ + + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + if (event) { + + 20 + + if (event) { +
+ 19 + + return ( + + 21 + + return ( +
+ 20 + + <Toast type="warning" title="New Changes"> + + +
+ 21 + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> + + +
+ 22 + + <p>Warning: Non saved modification will be lost.</p> + + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + <ToastButtons> + + 25 + + <ToastButtons> +
+ 24 + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> + + +
+ 25 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> + + 26 + + <ToastButton icon="redo" onClick={reload}> +
+ + + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + + 28 + + </ToastButton> +
+ + + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
+ + + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + + 31 + + </ToastButton> +
+ 26 + + </ToastButtons> + + 32 + + </ToastButtons> +
+ 27 + + </Toast> + + 33 + + </Toast> +
+ 28 + + ); + + 34 + + ); +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + +
-
- - - + + + + + + + + + + +
+
- 181 - - "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." - - 181 - - "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - - } - - 182 - - } -
- 183 - - } - - 183 - - } -
- + src/main/resources/locales/de/plugins.json + + + modify + + +
+
+
+ + + + + +
+
+
+ + +
+ + + - + + + + - 184 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
+ 182 + + } + + 182 + + } +
+ 183 + + } + + 183 + + } +
+ + + 184 + + }, +
+ + + 185 + + "changeNotification": { +
+ + + 186 + + "title": "Neue Änderungen", +
+ + + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + + 189 + + "buttons": { +
+ + + 190 + + "reload": "Neu laden", +
+ + + 191 + + "ignore": "Ignorieren" +
+ + + 192 + + } +
+ 184 + + } + + 193 + + } +
+ 185 + }, -
- - - 185 - - "changeNotification": { -
- - - 186 - - "title": "Neue Änderungen", -
- - - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - - 189 - - "buttons": { -
- - - 190 - - "reload": "Neu laden", -
- - - 191 - - "ignore": "Ignorieren" -
- - - 192 - - } -
- 184 - - } - - 193 - - } -
- 185 - - }, - - 194 - - }, -
- 186 - - "permissions": { - - 195 - - "permissions": { -
-
- -
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- +
+ 194 + - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + +
- 181 - - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - 181 - - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." -
- 182 - - } - - 182 - - } -
- 183 - - } - - 183 - - } -
- - - 184 - }, -
+ 186 + + "permissions": { + + 195 + + "permissions": { +
+
+ +
+
+
+
-
- - - 185 - + - "changeNotification": { -
- - - 186 - - "title": "New Changes", -
+ + + + + + + - - + + + + + - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", - - - - + + + + + - 188 - - + + + + + - "modificationWarning": "Warning: Non saved modification will be lost.", - - - - + + + - 189 - - + + + - "buttons": { - - - - + + + - 190 - - + + + - "reload": "Reload", - - - - + + + - 191 - - + + + - "ignore": "Ignore" - - - - + + + - 192 - - + + + + + + + + + - - - + + + - 184 - - + + + + + - } - - - - - - - - - - - - - - - - - -
- - - 187 - + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
- - + 182 + + } + + 182 + + } +
+ 183 + + } + + 183 + + } +
- - + + + 184 + + }, +
+ + + 185 + + "changeNotification": { +
- - + + + 186 + + "title": "New Changes", +
+ + + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
- - + + + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + + 189 + + "buttons": { +
- - + + + 190 + + "reload": "Reload", +
+ + + 191 + + "ignore": "Ignore" +
+ + + 192 + + } +
+ 184 + } -
+ + 193 + + } +
+ 185 + + }, + + 194 + + }, +
- 193 - - } -
- 185 - - }, - - 194 - - }, -
- 186 - - "permissions": { - - 195 - - "permissions": { -
+ + 186 + + + "permissions": { + + + 195 + + + "permissions": { + + + + +
- -
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/test/java/com/cloudogu/scm/review/events/ClientTest.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + + + + - import javax.ws.rs.sse.OutboundSseEvent; - - + + + + + - 11 - - + + + + + - import javax.ws.rs.sse.OutboundSseEvent; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + - - + + + + + - client.send(message); - - + + + + + - 89 - - + + + + + - client.send(message); - - - + 86 + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + - - + + + + + - Thread.sleep(50L); - - - - + + + + + - 95 - - + + + + + - - - - - + + + - 96 - - + + + - verify(eventSink).close(); - - + + + + + - 91 - - + + + + + - verify(eventSink, timeout(50L)).close(); - - - - + + + + + - 97 - - - - - - - - - - - - - - - - - - -
- 7 - - import org.mockito.Mock; - - 7 - - import org.mockito.Mock; -
- 8 - - import org.mockito.junit.jupiter.MockitoExtension; - - 8 - - import org.mockito.junit.jupiter.MockitoExtension; -
- 9 - - import sonia.scm.security.SessionId; - - 9 - - import sonia.scm.security.SessionId; -
+
+
- 10 - - -
- 10 - + 7 + + import org.mockito.Mock; + + 7 + + import org.mockito.Mock; +
+ 8 + + import org.mockito.junit.jupiter.MockitoExtension; + + 8 + + import org.mockito.junit.jupiter.MockitoExtension; +
+ 9 + + import sonia.scm.security.SessionId; + + 9 + + import sonia.scm.security.SessionId; +
- 11 - - import javax.ws.rs.sse.SseEventSink; - - 12 - - import javax.ws.rs.sse.SseEventSink; -
- 12 - - - - -
- 13 - - import java.time.Clock; - - 13 - - import java.time.Clock; -
- 14 - - import java.time.Instant; - - 14 - - import java.time.Instant; -
- 15 - - import java.time.LocalDateTime; - - 15 - - import java.time.LocalDateTime; -
- 16 - - import java.time.ZoneOffset; - - 16 - - import java.time.ZoneOffset; -
- 17 - - import java.time.temporal.ChronoField; - - 17 - - import java.time.temporal.ChronoField; -
- 18 - - import java.time.temporal.ChronoUnit; - - -
- 19 - - import java.time.temporal.TemporalField; - - -
- 20 - - import java.util.concurrent.CompletableFuture; - - 18 - - import java.util.concurrent.CompletableFuture; -
- 21 - - import java.util.concurrent.CompletionStage; - - 19 - - import java.util.concurrent.CompletionStage; -
- 22 - - import java.util.concurrent.atomic.AtomicLong; - - -
- 23 - - import java.util.concurrent.atomic.AtomicReference; - - 20 - - import java.util.concurrent.atomic.AtomicReference; -
- 24 - - - - 21 - - -
- 25 - - import static java.time.temporal.ChronoUnit.MINUTES; - - 22 - - import static java.time.temporal.ChronoUnit.MINUTES; -
-
-
- 83 - - - - 80 - - -
- 84 - - @Test - - 81 - - @Test -
- 85 - - @SuppressWarnings("unchecked") - - 82 - - @SuppressWarnings("unchecked") -
- 86 - - void shouldCloseEventSinkOnFailure() throws InterruptedException { - - 83 - - void shouldCloseEventSinkOnFailure() { -
- 87 - - CompletionStage future = CompletableFuture.supplyAsync(() -> { - - 84 - - CompletionStage future = CompletableFuture.supplyAsync(() -> { -
- 88 - - throw new RuntimeException("failed to send message"); - - 85 - - throw new RuntimeException("failed to send message"); -
- 89 - - }); - - 86 - - }); -
-
-
+ +
+ 10 + + import javax.ws.rs.sse.OutboundSseEvent; + + 11 + + import javax.ws.rs.sse.OutboundSseEvent; +
+ 11 + + import javax.ws.rs.sse.SseEventSink; + + 12 + + import javax.ws.rs.sse.SseEventSink; +
+ 12 + + + + +
+ 13 + + import java.time.Clock; + + 13 + + import java.time.Clock; +
+ 14 + + import java.time.Instant; + + 14 + + import java.time.Instant; +
+ 15 + + import java.time.LocalDateTime; + + 15 + + import java.time.LocalDateTime; +
+ 16 + + import java.time.ZoneOffset; + + 16 + + import java.time.ZoneOffset; +
+ 17 + + import java.time.temporal.ChronoField; + + 17 + + import java.time.temporal.ChronoField; +
+ 18 + + import java.time.temporal.ChronoUnit; + + +
+ 19 + + import java.time.temporal.TemporalField; + + +
+ 20 + + import java.util.concurrent.CompletableFuture; + + 18 + + import java.util.concurrent.CompletableFuture; +
+ 21 + + import java.util.concurrent.CompletionStage; + + 19 + + import java.util.concurrent.CompletionStage; +
+ 22 + + import java.util.concurrent.atomic.AtomicLong; + + +
+ 23 + + import java.util.concurrent.atomic.AtomicReference; + + 20 + + import java.util.concurrent.atomic.AtomicReference; +
+ 24 + + + + 21 + + +
+ 25 + + import static java.time.temporal.ChronoUnit.MINUTES; + + 22 + + import static java.time.temporal.ChronoUnit.MINUTES; +
- 91 - - - - 88 - - -
+
+
- 92 - + 83 + + + + 80 + + +
+ 84 + + @Test + + 81 + + @Test +
+ 85 + + @SuppressWarnings("unchecked") + + 82 + + @SuppressWarnings("unchecked") +
+ void shouldCloseEventSinkOnFailure() throws InterruptedException { + + 83 + + void shouldCloseEventSinkOnFailure() { +
+ 87 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { + + 84 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { +
+ 88 + + throw new RuntimeException("failed to send message"); + + 85 + + throw new RuntimeException("failed to send message"); +
+ 89 + + }); + + 86 + + }); +
- 93 - - - - 90 - - -
+
+
- 94 - + 91 + + + + 88 + + +
- -
+ 92 + + client.send(message); + + 89 + + client.send(message); +
+ 93 + + + + 90 + + +
- -
+ 94 + + Thread.sleep(50L); + + +
+ 95 + + + + +
+ 96 + + verify(eventSink).close(); + + 91 + + verify(eventSink, timeout(50L)).close(); +
+ 97 + + } + + 92 + + } +
+ 98 + + + + 93 + + +
- } - - 92 - - } -
- 98 - - - - 93 - - -
- 99 - - @Test - - 94 - - @Test -
+ + 99 + + + @Test + + + 94 + + + @Test + + + + +
- -
- - - Main.java - - - modify - -
-
+ + + Main.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - + + - - + + + - import java.util.Arrays; - - + + + + + - 2 - - + + + + + - import java.util.Arrays; - - - - + + + + + - 2 - - + + + - - - + + + - 3 - - + + + + + - - - - - + + + - 3 - - + + + + + - class Main { - - + + + + + - 4 - - + + + + + - class Main { - - - - + + + - 5 - - + + + - private static final PrintStream OUT = System.out; - - - - + + + - 6 - - + + + - - - - - + + + - 4 - - + + + + + - public static void main(String[] args) { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+
- 1 - - import java.io.PrintStream; -
- 1 - + + + 1 + + import java.io.PrintStream; +
+ 1 + + import java.util.Arrays; + + 2 + + import java.util.Arrays; +
+ 2 + + + + 3 + + +
+ 3 + + class Main { + + 4 + + class Main { +
+ + + 5 + + private static final PrintStream OUT = System.out; +
+ + + 6 + + +
+ 4 + + public static void main(String[] args) { + + 7 + + public static void main(String[] args) { +
+ + + 8 + + <<<<<<< HEAD +
+ 5 + + System.out.println("Expect nothing more to happen."); + + 9 + + System.out.println("Expect nothing more to happen."); +
+ 6 + + System.out.println("The command line parameters are:"); + + 10 + + System.out.println("The command line parameters are:"); +
+ 7 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); + + 11 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); +
- - + + + 12 + + ======= +
+ + + 13 + + OUT.println("Expect nothing more to happen."); +
- - + + + 14 + + OUT.println("Parameters:"); +
+ + + 15 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); +
+ + + 16 + + >>>>>>> feature/use_constant +
+ 8 + + } + + 17 + + } +
- 7 - - public static void main(String[] args) { -
- - - 8 - - <<<<<<< HEAD -
- 5 - - System.out.println("Expect nothing more to happen."); - - 9 - - System.out.println("Expect nothing more to happen."); -
- 6 - - System.out.println("The command line parameters are:"); - - 10 - - System.out.println("The command line parameters are:"); -
- 7 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); - - 11 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); -
- - - 12 - - ======= -
- - - 13 - - OUT.println("Expect nothing more to happen."); -
- - - 14 - - OUT.println("Parameters:"); -
- - - 15 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); -
- - - 16 - - >>>>>>> feature/use_constant -
- 8 - - } - - 17 - - } -
- 9 - - } - - 18 - - } -
+ + 9 + + + } + + + 18 + + + } + + + + +
@@ -35745,3834 +35824,3842 @@ exports[`Storyshots Diff SyntaxHighlighting 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 1 - - 1 - - package com.cloudogu.scm.review.events; -
- 2 - - 2 - - -
- 3 - - - import com.cloudogu.scm.review.comment.service.BasicComment; -
- 4 - - - import com.cloudogu.scm.review.comment.service.BasicCommentEvent; -
- 5 - - - import com.cloudogu.scm.review.comment.service.CommentEvent; -
- 6 - - - import com.cloudogu.scm.review.comment.service.ReplyEvent; -
- 7 - - 3 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; -
- 8 - - 4 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; -
- 9 - - - import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; -
- 10 - - 5 - - import com.github.legman.Subscribe; -
- 11 - - - import lombok.Data; -
- 12 - - 6 - - import org.apache.shiro.SecurityUtils; -
- 13 - - 7 - - import org.apache.shiro.subject.PrincipalCollection; -
- 14 - - 8 - - import org.apache.shiro.subject.Subject; -
- 15 - - 9 - - import sonia.scm.EagerSingleton; -
- 16 - - - import sonia.scm.HandlerEventType; -
- 17 - - - import sonia.scm.event.HandlerEvent; -
- 18 - - 10 - - import sonia.scm.plugin.Extension; -
- 19 - - 11 - - import sonia.scm.repository.Repository; -
- 20 - - 12 - - import sonia.scm.security.SessionId; -
-
-
-
-
-
- - - src/main/js/ChangeNotification.tsx - - - modify - -
-
-
-
- - - - - -
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + + + + - 6 - - + + + + - - - - - - - - - - - - - - - - - + - - - - - + + - 15 - - + + + - 16 - - + + + - pullRequest: setEvent - - - - + + + - 16 - - + + + + - 17 - - + + + + - }); - - - - + + + - 17 - - + + + + - 18 - - + + + - }, [url]); - - - - + + + + - 19 - - + + + + - const { t } = useTranslation("plugins"); - - - - + + + + - 18 - - + + + + - 20 - - + + + - if (event) { - - - - + + + - 19 - - + + + + - 21 - - + + + + - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 2 - - 2 - - import { Link } from "@scm-manager/ui-types"; -
- 3 - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - 4 - - import { PullRequest } from "./types/PullRequest"; -
+
- 5 - - import { useTranslation } from "react-i18next"; -
- 5 - + 1 + + 1 + + package com.cloudogu.scm.review.events; +
+ 2 + + 2 + + +
- 6 - - 7 - - type HandlerProps = { -
- 7 - - 8 - - url: string; -
-
+ 3 +
-
+ import com.cloudogu.scm.review.comment.service.BasicComment; +
+ 4 + + + import com.cloudogu.scm.review.comment.service.BasicCommentEvent; +
+ 5 + + + import com.cloudogu.scm.review.comment.service.CommentEvent; +
+ 6 + + + import com.cloudogu.scm.review.comment.service.ReplyEvent; +
+ 7 + + 3 + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; +
+ 8 + + 4 + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; +
+ 9 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; +
+ 10 + + 5 + + import com.github.legman.Subscribe; +
+ 11 + + + import lombok.Data; +
- + 12 + + 6 + + import org.apache.shiro.SecurityUtils; +
+ 13 + + 7 + + import org.apache.shiro.subject.PrincipalCollection; +
+ 14 + + 8 + + import org.apache.shiro.subject.Subject; +
+ 15 + + 9 + + import sonia.scm.EagerSingleton; +
+ 16 + + + import sonia.scm.HandlerEventType; +
+ 17 + + + import sonia.scm.event.HandlerEvent; +
+ 18 + + 10 + + import sonia.scm.plugin.Extension; +
+ 19 + + 11 + + import sonia.scm.repository.Repository; +
- 20 - - - <Toast type="warning" title="New Changes"> -
- 21 - - - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> -
- 22 - - - <p>Warning: Non saved modification will be lost.</p> -
- - 22 - - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> -
- - 23 - - <p>{t("scm-review-plugin.changeNotification.description")}</p> -
- - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - 25 - - <ToastButtons> -
- 24 - - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> -
- 25 - - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> -
- - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - 28 - - </ToastButton> -
- - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - 31 - - </ToastButton> -
- 26 - - 32 - - </ToastButtons> -
- 27 - - 33 - - </Toast> -
- 28 - - 34 - - ); -
+ + 20 + + + 12 + + + import sonia.scm.security.SessionId; + + + + +
-
-
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 2 + + 2 + + import { Link } from "@scm-manager/ui-types"; +
+ 3 + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + 4 + + import { PullRequest } from "./types/PullRequest"; +
+ + 5 + + import { useTranslation } from "react-i18next"; +
+ 5 + + 6 + + +
+ 6 + + 7 + + type HandlerProps = { +
+ 7 + + 8 + + url: string; +
+
+
+ 15 + + 16 + + pullRequest: setEvent +
+ 16 + + 17 + + }); +
+ 17 + + 18 + + }, [url]); +
+ + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + 20 + + if (event) { +
+ 19 + + 21 + + return ( +
+ 20 + + + <Toast type="warning" title="New Changes"> +
+ 21 + + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> +
+ 22 + + + <p>Warning: Non saved modification will be lost.</p> +
+ + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + 25 + + <ToastButtons> +
+ 24 + + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> +
+ 25 + + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> +
+ + 26 + + <ToastButton icon="redo" onClick={reload}> +
+ + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + 28 + + </ToastButton> +
+ + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
+ + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + 31 + + </ToastButton> +
+ 26 + + 32 + + </ToastButtons> +
+ 27 + + 33 + + </Toast> +
+ 28 + + 34 + + ); +
+
- - - - - - - - - - - - - + +
-
- + + + + +
+ - 181 - + - 181 - - "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - + + + + + + + + + + +
+ + + + + + + + - 182 - - + + + + + + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ 181 + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
+ 182 + + 182 + + } +
+ 183 + + 183 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "Neue Änderungen", -
- - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Neu laden", -
- - 191 - - "ignore": "Ignorieren" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
- -
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- +
- - - - - - - - - -
- - - - - - - - - + + - 181 - - + + + - 181 - - + + + - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - - - + + + - 182 - - + + + - 182 - - + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + - - - + - 185 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "Neue Änderungen", +
+ + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Neu laden", +
+ + 191 + + "ignore": "Ignorieren" +
+ + 192 + } -
- 183 - - 183 - +
+ 184 + + 193 + } -
- - 184 - +
+ 185 + + 194 + }, -
- +
- "changeNotification": { -
- - 186 - - "title": "New Changes", -
- - 187 - - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", -
- - 188 - - "modificationWarning": "Warning: Non saved modification will be lost.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Reload", -
- - 191 - - "ignore": "Ignore" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
+
+ 186 + + 195 + + "permissions": { +
+
- -
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 181 + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
+ 182 + + 182 + + } +
+ 183 + + 183 + + } +
+ + 184 + + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "New Changes", +
+ + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
+ + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Reload", +
+ + 191 + + "ignore": "Ignore" +
+ + 192 + + } +
+ 184 + + 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + +
+
- 7 - - 7 - - import org.mockito.Mock; -
- 8 - - 8 - - import org.mockito.junit.jupiter.MockitoExtension; -
- 9 - - 9 - - import sonia.scm.security.SessionId; -
- - 10 - + - -
- 10 - - 11 - - import javax.ws.rs.sse.OutboundSseEvent; -
- 11 - - 12 - - import javax.ws.rs.sse.SseEventSink; -
- 12 - - - -
- 13 - - 13 - - import java.time.Clock; -
- 14 - - 14 - - import java.time.Instant; -
- 15 - - 15 - - import java.time.LocalDateTime; -
- 16 - - 16 - - import java.time.ZoneOffset; -
- 17 - - 17 - - import java.time.temporal.ChronoField; -
- 18 - - - import java.time.temporal.ChronoUnit; -
- 19 - - - import java.time.temporal.TemporalField; -
- 20 - - 18 - - import java.util.concurrent.CompletableFuture; -
- 21 - - 19 - - import java.util.concurrent.CompletionStage; -
- 22 - - - import java.util.concurrent.atomic.AtomicLong; -
- 23 - - 20 - - import java.util.concurrent.atomic.AtomicReference; -
- 24 - - 21 - - -
- 25 - - 22 - - import static java.time.temporal.ChronoUnit.MINUTES; -
- - + + + + + -
+ 7 + +
+ + + + + + + + + + + + + + - - - - - + + + - 83 - - + + + + - 80 - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 7 + + import org.mockito.Mock; +
+ 8 + + 8 + + import org.mockito.junit.jupiter.MockitoExtension; +
+ 9 + + 9 + + import sonia.scm.security.SessionId; +
-
+ 10 + + +
+ 10 + + 11 + + import javax.ws.rs.sse.OutboundSseEvent; +
+ 11 + + 12 + + import javax.ws.rs.sse.SseEventSink; +
- 84 - - 81 - - @Test -
- 85 - - 82 - - @SuppressWarnings("unchecked") -
- 86 - - - void shouldCloseEventSinkOnFailure() throws InterruptedException { -
- - 83 - - void shouldCloseEventSinkOnFailure() { -
- 87 - - 84 - - CompletionStage future = CompletableFuture.supplyAsync(() -> { -
- 88 - - 85 - - throw new RuntimeException("failed to send message"); -
- 89 - - 86 - - }); -
-
+ 12 +
-
+ 13 + + 13 + + import java.time.Clock; +
+ 14 + + 14 + + import java.time.Instant; +
+ 15 + + 15 + + import java.time.LocalDateTime; +
+ 16 + + 16 + + import java.time.ZoneOffset; +
+ 17 + + 17 + + import java.time.temporal.ChronoField; +
+ 18 + + + import java.time.temporal.ChronoUnit; +
+ 19 + + + import java.time.temporal.TemporalField; +
+ 20 + + 18 + + import java.util.concurrent.CompletableFuture; +
+ 21 + + 19 + + import java.util.concurrent.CompletionStage; +
+ 22 + + + import java.util.concurrent.atomic.AtomicLong; +
+ 23 + + 20 + + import java.util.concurrent.atomic.AtomicReference; +
+ 24 + + 21 + + +
+ 25 + + 22 + + import static java.time.temporal.ChronoUnit.MINUTES; +
+
+
+ 83 + + 80 + + +
+ 84 + + 81 + + @Test +
+ 85 + + 82 + + @SuppressWarnings("unchecked") +
+ 86 + + + void shouldCloseEventSinkOnFailure() throws InterruptedException { +
+ + 83 + + void shouldCloseEventSinkOnFailure() { +
+ 87 + + 84 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { +
+ 88 + + 85 + + throw new RuntimeException("failed to send message"); +
+ 89 + + 86 + + }); +
+
+
+ 91 + + 88 + + +
+ 92 + + 89 + + client.send(message); +
+ 93 + + 90 + + +
+ 94 + + + Thread.sleep(50L); +
+ 95 + + + +
+ 96 + + + verify(eventSink).close(); +
+ + 91 + + verify(eventSink, timeout(50L)).close(); +
+ 97 + + 92 + + } +
+ 98 + + 93 + + +
+ 99 + + 94 + + @Test +
+
+ +
+
+
- - - 91 - - - 88 - - - - - - - - 92 - - - 89 - - - client.send(message); - - - - - 93 - - - 90 - - - - - - - - 94 - - - - Thread.sleep(50L); - - - + + modify + +
+
- - 95 - - + + + + + +
+
+
+ + +
+ + + - - - - - - - + + - - + + + - verify(eventSink, timeout(50L)).close(); - - - - + + + + - 97 - - + + + + - 92 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - -
- -
- 96 - - - verify(eventSink).close(); -
- - 91 - + + 1 + + import java.io.PrintStream; +
+ 1 + + 2 + + import java.util.Arrays; +
+ 2 + + 3 + + +
+ 3 + + 4 + + class Main { +
+ + 5 + + private static final PrintStream OUT = System.out; +
+ + 6 + + +
+ 4 + + 7 + + public static void main(String[] args) { +
+ + 8 + + <<<<<<< HEAD +
+ 5 + + 9 + + System.out.println("Expect nothing more to happen."); +
+ 6 + + 10 + + System.out.println("The command line parameters are:"); +
+ 7 + + 11 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); +
+ + 12 + + ======= +
+ + 13 + + OUT.println("Expect nothing more to happen."); +
+ + 14 + + OUT.println("Parameters:"); +
+ + 15 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); +
+ + 16 + + >>>>>>> feature/use_constant +
+ 8 + + 17 + + } +
+ 9 + + 18 + } -
- 98 - - 93 - - -
- 99 - - 94 - - @Test -
-
- -
-
-
-
- - - Main.java - - - modify - -
-
-
-
- - - - - -
-
-
+ + + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 1 - - import java.io.PrintStream; -
- 1 - - 2 - - import java.util.Arrays; -
- 2 - - 3 - - -
- 3 - - 4 - - class Main { -
- - 5 - - private static final PrintStream OUT = System.out; -
- - 6 - - -
- 4 - - 7 - - public static void main(String[] args) { -
- - 8 - - <<<<<<< HEAD -
- 5 - - 9 - - System.out.println("Expect nothing more to happen."); -
- 6 - - 10 - - System.out.println("The command line parameters are:"); -
- 7 - - 11 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); -
- - 12 - - ======= -
- - 13 - - OUT.println("Expect nothing more to happen."); -
- - 14 - - OUT.println("Parameters:"); -
- - 15 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); -
- - 16 - - >>>>>>> feature/use_constant -
- 8 - - 17 - - } -
- 9 - - 18 - - } -
-
`; @@ -39581,4304 +39668,4312 @@ exports[`Storyshots Diff WithLinkToFile 1`] = `
-
+
- - - src/main/java/com/cloudogu/scm/review/events/EventListener.java - - - modify - -
-
+ + + src/main/java/com/cloudogu/scm/review/events/EventListener.java + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
- 1 - - 1 - - package com.cloudogu.scm.review.events; -
- 2 - - 2 - - -
- 3 - +
- import com.cloudogu.scm.review.comment.service.BasicComment; -
- 4 - - - import com.cloudogu.scm.review.comment.service.BasicCommentEvent; -
- 5 - - - import com.cloudogu.scm.review.comment.service.CommentEvent; -
- 6 - - - import com.cloudogu.scm.review.comment.service.ReplyEvent; -
- 7 - - 3 - - import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; -
- 8 - - 4 - - import com.cloudogu.scm.review.pullrequest.service.PullRequest; -
- 9 - - - import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; -
- 10 - - 5 - - import com.github.legman.Subscribe; -
- 11 - - - import lombok.Data; -
- 12 - - 6 - - import org.apache.shiro.SecurityUtils; -
- 13 - - 7 - - import org.apache.shiro.subject.PrincipalCollection; -
- 14 - - 8 - - import org.apache.shiro.subject.Subject; -
- 15 - - 9 - - import sonia.scm.EagerSingleton; -
- 16 - - - import sonia.scm.HandlerEventType; -
- 17 - - - import sonia.scm.event.HandlerEvent; -
- 18 - - 10 - - import sonia.scm.plugin.Extension; -
- 19 - - 11 - - import sonia.scm.repository.Repository; -
- 20 - - 12 - - import sonia.scm.security.SessionId; -
-
+ 1 +
+ 1 + + package com.cloudogu.scm.review.events; +
+ 2 + + 2 + - - - - diff.expandLastBottomByLines - - +
+ 3 + + + import com.cloudogu.scm.review.comment.service.BasicComment; +
+ 4 + + + import com.cloudogu.scm.review.comment.service.BasicCommentEvent; +
+ 5 + + + import com.cloudogu.scm.review.comment.service.CommentEvent; +
+ 6 + + + import com.cloudogu.scm.review.comment.service.ReplyEvent; +
+ 7 + + 3 + + import com.cloudogu.scm.review.pullrequest.service.BasicPullRequestEvent; +
+ 8 + + 4 + + import com.cloudogu.scm.review.pullrequest.service.PullRequest; +
+ 9 + + + import com.cloudogu.scm.review.pullrequest.service.PullRequestEvent; +
+ 10 + + 5 + + import com.github.legman.Subscribe; +
+ 11 + + + import lombok.Data; +
+ 12 + + 6 + + import org.apache.shiro.SecurityUtils; +
+ 13 + + 7 + + import org.apache.shiro.subject.PrincipalCollection; +
+ 14 + + 8 + + import org.apache.shiro.subject.Subject; +
+ 15 + + 9 + + import sonia.scm.EagerSingleton; +
+ 16 + + + import sonia.scm.HandlerEventType; +
+ 17 + + + import sonia.scm.event.HandlerEvent; +
+ 18 + + 10 + + import sonia.scm.plugin.Extension; +
+ 19 + + 11 + + import sonia.scm.repository.Repository; +
+ 20 + + 12 + + import sonia.scm.security.SessionId; +
+
- + + + + diff.expandLastBottomByLines + - diff.expandLastBottomComplete - -
-
+ + + + diff.expandLastBottomComplete + +
+ + + + +
- -
- - - src/main/js/ChangeNotification.tsx - - - modify - -
-
+ + + src/main/js/ChangeNotification.tsx + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - + + + + + + - - - - + + + diff.expandComplete + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
-
+
- - - - diff.expandComplete - - -
- 2 - - 2 - - import { Link } from "@scm-manager/ui-types"; -
- 3 - - 3 - - import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; -
- 4 - - 4 - - import { PullRequest } from "./types/PullRequest"; -
- - 5 - - import { useTranslation } from "react-i18next"; -
- 5 - - 6 - - -
- 6 - - 7 - - type HandlerProps = { -
- 7 - - 8 - - url: string; -
-
- - - - diff.expandComplete - -
-
-
+
- - - - diff.expandComplete - - -
- 15 - - 16 - - pullRequest: setEvent -
- 16 - - 17 - - }); -
- 17 - - 18 - - }, [url]); -
- - 19 - - const { t } = useTranslation("plugins"); -
- 18 - - 20 - - if (event) { -
- 19 - - 21 - - return ( -
- 20 - - - <Toast type="warning" title="New Changes"> -
- 21 - - - <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> -
- 22 - - - <p>Warning: Non saved modification will be lost.</p> -
- - 22 - - <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> -
- - 23 - - <p>{t("scm-review-plugin.changeNotification.description")}</p> -
- - 24 - - <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> -
- 23 - - 25 - - <ToastButtons> -
- 24 - - - <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> -
- 25 - - - <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> -
- - 26 - - <ToastButton icon="redo" onClick={reload}> -
- - 27 - - {t("scm-review-plugin.changeNotification.buttons.reload")} -
- - 28 - - </ToastButton> -
- - 29 - - <ToastButton icon="times" onClick={() => setEvent(undefined)}> -
- - 30 - - {t("scm-review-plugin.changeNotification.buttons.ignore")} -
- - 31 - - </ToastButton> -
- 26 - - 32 - - </ToastButtons> -
- 27 - - 33 - - </Toast> -
- 28 - - 34 - - ); -
-
+
+ import { Link } from "@scm-manager/ui-types"; +
+ 3 + + 3 + + import { apiClient, Toast, ToastButtons, ToastButton } from "@scm-manager/ui-components"; +
+ 4 + + 4 + + import { PullRequest } from "./types/PullRequest"; +
+ + 5 + + import { useTranslation } from "react-i18next"; +
+ 5 + + 6 + - - - - diff.expandLastBottomByLines - - +
+ 6 + + 7 + + type HandlerProps = { +
+ 7 + + 8 + + url: string; +
+
- + + + + diff.expandComplete + +
+
+
+ + + + diff.expandComplete + +
+
+ 15 + + 16 + + pullRequest: setEvent +
+ 16 + + 17 + + }); +
+ 17 + + 18 + + }, [url]); +
+ + 19 + + const { t } = useTranslation("plugins"); +
+ 18 + + 20 + + if (event) { +
+ 19 + + 21 + + return ( +
+ 20 + + + <Toast type="warning" title="New Changes"> +
+ 21 + + + <p>The underlying Pull-Request has changed. Press reload to see the changes.</p> +
+ 22 + + + <p>Warning: Non saved modification will be lost.</p> +
+ + 22 + + <Toast type="warning" title={t("scm-review-plugin.changeNotification.title")}> +
+ + 23 + + <p>{t("scm-review-plugin.changeNotification.description")}</p> +
+ + 24 + + <p>{t("scm-review-plugin.changeNotification.modificationWarning")}</p> +
+ 23 + + 25 + + <ToastButtons> +
+ 24 + + + <ToastButton icon="redo" onClick={reload}>Reload</ToastButton> +
+ 25 + + + <ToastButton icon="times" onClick={() => setEvent(undefined)}>Ignore</ToastButton> +
+ + 26 + + <ToastButton icon="redo" onClick={reload}> +
+ + 27 + + {t("scm-review-plugin.changeNotification.buttons.reload")} +
+ + 28 + + </ToastButton> +
+ + 29 + + <ToastButton icon="times" onClick={() => setEvent(undefined)}> +
+ + 30 + + {t("scm-review-plugin.changeNotification.buttons.ignore")} +
+ + 31 + + </ToastButton> +
+ 26 + + 32 + + </ToastButtons> +
+ 27 + + 33 + + </Toast> +
+ 28 + + 34 + + ); +
+
+ + + + diff.expandLastBottomByLines + - diff.expandLastBottomComplete - -
-
+ + + + diff.expandLastBottomComplete + +
+ + + + + - -
- - - src/main/resources/locales/de/plugins.json - - - modify - -
-
+ + + src/main/resources/locales/de/plugins.json + + + modify + +
+
- - - - - + + + + +
-
-
- - - - - - - - - + + + + + + - - - - + + + diff.expandComplete + + + + + + - - + + + + - 181 - - - - - - - + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
+
- - + + + + diff.expandByLines + - diff.expandByLines - - - - - - diff.expandComplete - - -
- 181 - + 181 + + 181 + + "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." +
- "titleClickable": "Der Kommentar bezieht sich auf eine ältere Version des Source- oder Target-Branches. Klicken Sie hier, um den ursprünglichen Kontext zu sehen." -
- 182 - - 182 - + 182 + + 182 + + } +
+ 183 + + 183 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "Neue Änderungen", -
- - 187 - - "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", -
- - 188 - - "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Neu laden", -
- - 191 - - "ignore": "Ignorieren" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
+
- - - - diff.expandLastBottomByLines - - - - - - diff.expandLastBottomComplete - - -
-
- -
-
-
-
- - - src/main/resources/locales/en/plugins.json - - - modify - -
-
-
-
- + - - - - -
-
-
-
-
-
- - - - - - - - - + -
+
- - - - - + + - 181 - - + + + - 181 - - + + + - "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." - - - - + + + - 182 - - + + + - 182 - - + + + + + + + + + - - - + - 183 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - -
+
- - - - diff.expandByLines - - - - - - diff.expandComplete - - -
+ + "changeNotification": { +
+ + 186 + + "title": "Neue Änderungen", +
+ + 187 + + "description": "An diesem Pull Request wurden Änderungen vorgenommen. Laden Sie die Seite neu um diese anzuzeigen.", +
+ + 188 + + "modificationWarning": "Warnung: Nicht gespeicherte Eingaben gehen verloren.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Neu laden", +
+ + 191 + + "ignore": "Ignorieren" +
+ + 192 + } -
+
- 183 - - } -
- - 184 - - }, -
- - 185 - - "changeNotification": { -
- - 186 - - "title": "New Changes", -
- - 187 - - "description": "The underlying Pull-Request has changed. Press reload to see the changes.", -
- - 188 - - "modificationWarning": "Warning: Non saved modification will be lost.", -
- - 189 - - "buttons": { -
- - 190 - - "reload": "Reload", -
- - 191 - - "ignore": "Ignore" -
- - 192 - - } -
- 184 - - 193 - - } -
- 185 - - 194 - - }, -
- 186 - - 195 - - "permissions": { -
-
- +
+ 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
- + + + + diff.expandLastBottomByLines + - diff.expandLastBottomByLines - - - - - - diff.expandLastBottomComplete - -
-
+ + + + diff.expandLastBottomComplete + +
+ + + + +
- -
- - - src/test/java/com/cloudogu/scm/review/events/ClientTest.java - - - modify - -
-
+ + + src/main/resources/locales/en/plugins.json + + + modify + +
+
- - - - - + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + diff.expandByLines + + + + + + diff.expandComplete + +
+
+ 181 + + 181 + + "titleClickable": "The comment is related to an older of the source or target branch. Click here to see the original context." +
+ 182 + + 182 + + } +
+ 183 + + 183 + + } +
+ + 184 + + }, +
+ + 185 + + "changeNotification": { +
+ + 186 + + "title": "New Changes", +
+ + 187 + + "description": "The underlying Pull-Request has changed. Press reload to see the changes.", +
+ + 188 + + "modificationWarning": "Warning: Non saved modification will be lost.", +
+ + 189 + + "buttons": { +
+ + 190 + + "reload": "Reload", +
+ + 191 + + "ignore": "Ignore" +
+ + 192 + + } +
+ 184 + + 193 + + } +
+ 185 + + 194 + + }, +
+ 186 + + 195 + + "permissions": { +
+
+ + + + diff.expandLastBottomByLines + + + + + + diff.expandLastBottomComplete + +
+
+
- - - - - - - - - - - - + + + +
+
+ + + src/test/java/com/cloudogu/scm/review/events/ClientTest.java + + + modify + + +
+
- - - diff.expandComplete + + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - + -
+ 10 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + diff.expandComplete + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- 7 - - 7 - - import org.mockito.Mock; -
- 8 - - 8 - - import org.mockito.junit.jupiter.MockitoExtension; -
- 9 - - 9 - - import sonia.scm.security.SessionId; -
+
- 10 - - -
- 10 - - 11 - - import javax.ws.rs.sse.OutboundSseEvent; -
- 11 - - 12 - - import javax.ws.rs.sse.SseEventSink; -
- 12 - - - -
- 13 - - 13 - - import java.time.Clock; -
- 14 - - 14 - - import java.time.Instant; -
- 15 - - 15 - - import java.time.LocalDateTime; -
- 16 - - 16 - - import java.time.ZoneOffset; -
- 17 - - 17 - - import java.time.temporal.ChronoField; -
- 18 - - - import java.time.temporal.ChronoUnit; -
- 19 - - - import java.time.temporal.TemporalField; -
- 20 - - 18 - - import java.util.concurrent.CompletableFuture; -
- 21 - - 19 - - import java.util.concurrent.CompletionStage; -
- 22 - - - import java.util.concurrent.atomic.AtomicLong; -
- 23 - - 20 - - import java.util.concurrent.atomic.AtomicReference; -
- 24 - - 21 - - -
- 25 - - 22 - - import static java.time.temporal.ChronoUnit.MINUTES; -
-
+
- - - - diff.expandByLines - + + + + diff.expandComplete + + +
+ 7 + + 7 + + import org.mockito.Mock; +
+ 8 + + 8 + + import org.mockito.junit.jupiter.MockitoExtension; +
+ 9 + + 9 + + import sonia.scm.security.SessionId; +
+ + 10 + - - - - diff.expandComplete - - -
+
+ 11 + + import javax.ws.rs.sse.OutboundSseEvent; +
+ 11 + + 12 + + import javax.ws.rs.sse.SseEventSink; +
+ 12 + + - - - - diff.expandByLines - - +
+ 13 + + 13 + + import java.time.Clock; +
+ 14 + + 14 + + import java.time.Instant; +
+ 15 + + 15 + + import java.time.LocalDateTime; +
+ 16 + + 16 + + import java.time.ZoneOffset; +
+ 17 + + 17 + + import java.time.temporal.ChronoField; +
+ 18 + + + import java.time.temporal.ChronoUnit; +
+ 19 + + + import java.time.temporal.TemporalField; +
+ 20 + + 18 + + import java.util.concurrent.CompletableFuture; +
+ 21 + + 19 + + import java.util.concurrent.CompletionStage; +
+ 22 + + + import java.util.concurrent.atomic.AtomicLong; +
+ 23 + + 20 + + import java.util.concurrent.atomic.AtomicReference; +
+ 24 + + 21 + + +
+ 25 + + 22 + + import static java.time.temporal.ChronoUnit.MINUTES; +
+
- + + + + diff.expandByLines + - diff.expandComplete - -
-
+
+ + + + diff.expandByLines + + + + + + diff.expandComplete + +
+
+ 83 + + 80 + + +
+ 84 + + 81 + + @Test +
+ 85 + + 82 + + @SuppressWarnings("unchecked") +
+ 86 + + + void shouldCloseEventSinkOnFailure() throws InterruptedException { +
+ + 83 + + void shouldCloseEventSinkOnFailure() { +
+ 87 + + 84 + + CompletionStage future = CompletableFuture.supplyAsync(() -> { +
+ 88 + + 85 + + throw new RuntimeException("failed to send message"); +
+ 89 + + 86 + + }); +
+
+ + + + diff.expandComplete + +
+
+
+ + + + diff.expandComplete + +
+
+ 91 + + 88 + + +
+ 92 + + 89 + + client.send(message); +
+ 93 + + 90 + + +
+ 94 + + + Thread.sleep(50L); +
+ 95 + + + +
+ 96 + + + verify(eventSink).close(); +
+ + 91 + + verify(eventSink, timeout(50L)).close(); +
+ 97 + + 92 + + } +
+ 98 + + 93 + + +
+ 99 + + 94 + + @Test +
+
+ + + + diff.expandLastBottomByLines + + + + + + diff.expandLastBottomComplete + +
+
+
+ +
+
+
- - - 83 - - - 80 - - - - - - - - 84 - - - 81 - - - @Test - - - - - 85 - - - 82 - - - @SuppressWarnings("unchecked") - - - - - 86 - - - - void shouldCloseEventSinkOnFailure() throws InterruptedException { - - - + + modify + +
+
- - - 83 - - - void shouldCloseEventSinkOnFailure() { - - - - - 87 - - - 84 - - - CompletionStage future = CompletableFuture.supplyAsync(() -> { - - - - - 88 - - - 85 - - - throw new RuntimeException("failed to send message"); - - - - - 89 - - - 86 - - - }); - - - - - -
- - - diff.expandComplete + + +
- - - - +
+
+
+
+ - - + + + + + + -
+
- - - - - + + - 91 - - + + + + - 88 - - + + + + - - - - - + + + + - 92 - - + + + - 89 - - + + + - client.send(message); - - - - + + + + - 93 - - + + + - 90 - - + + + + - - - - - + + + + - 94 - - + + + + - Thread.sleep(50L); - - - - + + + - 95 - - + + + - - - - - + + + - 96 - - + + + - verify(eventSink).close(); - - - - + + + - 91 - - - - - - - + + + + + + + - - + + + - - - - - - - - - - - - - - - -
+
- - - - diff.expandComplete - - -
+ + import java.io.PrintStream; +
+ 1 + + 2 + + import java.util.Arrays; +
+ 2 + + 3 + + +
+ 3 + + 4 + + class Main { +
+ + 5 + + private static final PrintStream OUT = System.out; +
+ + 6 + + +
+ 4 + + 7 + + public static void main(String[] args) { +
+ + 8 + + <<<<<<< HEAD +
+ 5 + + 9 + + System.out.println("Expect nothing more to happen."); +
+ 6 + + 10 + + System.out.println("The command line parameters are:"); +
- + 7 + + 11 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); +
+ + 12 + + ======= +
- + + 13 + + OUT.println("Expect nothing more to happen."); +
+ + 14 + + OUT.println("Parameters:"); +
- + + 15 + + Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); +
- + + 16 + + >>>>>>> feature/use_constant +
- verify(eventSink, timeout(50L)).close(); -
- 97 - - 92 - + 8 + + 17 + + } +
+ 9 + + 18 + } -
- 98 - - 93 - - -
- 99 - - 94 - - @Test -
-
+
- - + + + + diff.expandLastBottomByLines + - diff.expandLastBottomByLines - - - - - - diff.expandLastBottomComplete - - -
-
- -
-
-
-
- - - Main.java - - - modify - -
-
-
-
- - - - - -
-
-
+ + + + diff.expandLastBottomComplete + +
+ + + +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 1 - - import java.io.PrintStream; -
- 1 - - 2 - - import java.util.Arrays; -
- 2 - - 3 - - -
- 3 - - 4 - - class Main { -
- - 5 - - private static final PrintStream OUT = System.out; -
- - 6 - - -
- 4 - - 7 - - public static void main(String[] args) { -
- - 8 - - <<<<<<< HEAD -
- 5 - - 9 - - System.out.println("Expect nothing more to happen."); -
- 6 - - 10 - - System.out.println("The command line parameters are:"); -
- 7 - - 11 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(System.out::println); -
- - 12 - - ======= -
- - 13 - - OUT.println("Expect nothing more to happen."); -
- - 14 - - OUT.println("Parameters:"); -
- - 15 - - Arrays.stream(args).map(arg -> "- " + arg).forEach(OUT::println); -
- - 16 - - >>>>>>> feature/use_constant -
- 8 - - 17 - - } -
- 9 - - 18 - - } -
-
- - - - diff.expandLastBottomByLines - - - - - - diff.expandLastBottomComplete - -
-
-
`; @@ -44045,14 +44140,20 @@ exports[`Storyshots Forms|Checkbox Default 1`] = `
@@ -44063,14 +44164,20 @@ exports[`Storyshots Forms|Checkbox Default 1`] = `
@@ -44081,14 +44188,20 @@ exports[`Storyshots Forms|Checkbox Default 1`] = `
@@ -44106,15 +44219,21 @@ exports[`Storyshots Forms|Checkbox Disabled 1`] = `
@@ -44132,14 +44251,20 @@ exports[`Storyshots Forms|Checkbox With HelpText 1`] = `