Skip to content
代码片段 群组 项目
提交 e3450b36 编辑于 作者: Jon Glassman's avatar Jon Glassman
浏览文件

Merge branch 'jira-regex' into 'master'

Improve Jira issue matching docs

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138665



Merged-by: default avatarJon Glassman <jglassman@gitlab.com>
Approved-by: default avatarJon Glassman <jglassman@gitlab.com>
Co-authored-by: default avatarAshraf Khamis <akhamis@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -58,8 +58,8 @@ To configure your project settings in GitLab:
- To [transition Jira issues automatically](../../user/project/issues/managing_issues.md#closing-issues-automatically) in GitLab,
select the **Enable Jira transitions** checkbox.
1. In the **Jira issue matching** section:
- For **Jira issue regex**, [enter a regex pattern](issues.md#use-regular-expression).
- For **Jira issue prefix**, [enter a prefix](issues.md#use-a-prefix).
- For **Jira issue regex**, [enter a regex pattern](issues.md#define-a-regex-pattern).
- For **Jira issue prefix**, [enter a prefix](issues.md#define-a-prefix).
1. In the **Issues** section:
- To [view Jira issues](issues.md#view-jira-issues) in GitLab, select the **Enable Jira issues** checkbox and
enter a Jira project key. You can only view issues from a single Jira project in a GitLab project.
......
......@@ -67,12 +67,16 @@ Jira issue can't be merged. The merge request displays the message
You can configure custom rules for how GitLab matches Jira issue keys by defining:
- [A regex pattern](#use-regular-expression)
- [A prefix](#use-a-prefix)
- [A regex pattern](#define-a-regex-pattern)
- [A prefix](#define-a-prefix)
When you do not configure custom rules, the [default behavior](https://gitlab.com/gitlab-org/gitlab/-/blob/9b062706ac6203f0fa897a9baf5c8e9be1876c74/lib/gitlab/regex.rb#L245) is used.
When you do not configure custom rules, the
[default behavior](https://gitlab.com/gitlab-org/gitlab/-/blob/9b062706ac6203f0fa897a9baf5c8e9be1876c74/lib/gitlab/regex.rb#L245) is used.
### Use regular expression
### Define a regex pattern
You can use a regular expression (regex) to match Jira issue keys.
The regex pattern must follow the [RE2 syntax](https://github.com/google/re2/wiki/Syntax).
To define a regex pattern for Jira issue keys:
......@@ -83,14 +87,14 @@ To define a regex pattern for Jira issue keys:
1. In the **Jira issue regex** text box, enter a regex pattern.
1. Select **Save changes**.
The regular expression must follow the [RE2 syntax](https://github.com/google/re2/wiki/Syntax).
For more information, see the [Atlassian documentation](https://confluence.atlassian.com/adminjiraserver073/changing-the-project-key-format-861253229.html).
For more information, see the
[Atlassian documentation](https://confluence.atlassian.com/adminjiraserver073/changing-the-project-key-format-861253229.html).
### Use a prefix
### Define a prefix
You can define a prefix for GitLab to match Jira issue keys. For example, if your Jira issue ID is `ALPHA-1`
and you've set a `JIRA#` prefix, GitLab matches `JIRA#ALPHA-1` rather than `ALPHA-1`.
You can use a prefix to match Jira issue keys.
For example, if your Jira issue key is `ALPHA-1` and you define a `JIRA#` prefix,
GitLab matches `JIRA#ALPHA-1` rather than `ALPHA-1`.
To define a prefix for Jira issue keys:
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册