diff --git a/config-ui/src/components/tooltip/help-tooltip/index.tsx b/config-ui/src/components/tooltip/help-tooltip/index.tsx
index 804e5acfcd7..ff7612d22e3 100644
--- a/config-ui/src/components/tooltip/help-tooltip/index.tsx
+++ b/config-ui/src/components/tooltip/help-tooltip/index.tsx
@@ -17,6 +17,7 @@
*/
import { QuestionCircleOutlined } from '@ant-design/icons';
+import type { TooltipProps } from 'antd';
import { Tooltip } from 'antd';
import styled from 'styled-components';
@@ -30,10 +31,10 @@ interface Props {
style?: React.CSSProperties;
}
-export const HelpTooltip = ({ content, style }: Props) => {
+export const HelpTooltip = ({ content, style, ...props }: Props & TooltipProps) => {
return (
-
+
diff --git a/config-ui/src/routes/project/detail/settings-panel.tsx b/config-ui/src/routes/project/detail/settings-panel.tsx
index df206cf7f5f..0a25d971f87 100644
--- a/config-ui/src/routes/project/detail/settings-panel.tsx
+++ b/config-ui/src/routes/project/detail/settings-panel.tsx
@@ -31,6 +31,8 @@ import { validName } from '../utils';
import * as S from './styled';
+const RegexPrIssueDefaultValue = '(?mi)(Closes)[\\s]*.*(((and )?#\\d+[ ]*)+)';
+
interface Props {
project: IProject;
onRefresh: () => void;
@@ -60,7 +62,7 @@ export const SettingsPanel = ({ project, onRefresh }: Props) => {
});
setLinker({
enable: linker?.enable ?? false,
- prToIssueRegexp: linker?.pluginOption?.prToIssueRegexp ?? '',
+ prToIssueRegexp: linker?.pluginOption?.prToIssueRegexp ?? RegexPrIssueDefaultValue,
});
}, [project]);
@@ -145,12 +147,23 @@ export const SettingsPanel = ({ project, onRefresh }: Props) => {
Parse the issue key with the regex from the title and description of the pull requests in this project.
- The default regex will parse the issue key from the table.pull_requests where the description
- contains "fix/close/.../resolved {'{'}issue_key{'}'}". The relationship between pull requests and
- issues will be stored in the table.pull_request_issues
-
+ <>
+
+ Example 1 - If your PR title or description contains a Jira issue key in the format 'Closes
+ [DI-123](www.yourdomain.atlassian.net/browse/di-123)', please use the following regex template:{' '}
+ {'{'}
+ (?mi)(fix|close|resolve|fixes|closes|resolves|fixed|closed|resolved)[\s]*.*(((and)?https://\S+.atlassian.net/browse/\S+[
+ ]*)+){'}'}
+
+
+ Example 2 - If your PR title or description contains a GitHub issue key in the format 'Resolves
+ www.github.com/namespace/repo_name/issues/123)', please use the following regex template: {'{'}
+ (?mi)(fix|close|resolve|fixes|closes|resolves|fixed|closed|resolved)[\s]*.*(((and)?https://github.com/%s/issues/\d+[
+ ]*)+){'}'}
+