External issues are not included in new merge request commit messages
Summary
When closing issues and using an external issue tracker the new merge commit message behaviour introduced in GitLab 8.15 does not preserve the issue references.
Steps to reproduce
- Enable an external issue tracker
- Open Merge request with a message/description containing “Closing gitlab-ce#123”
- Merge the merge request
Expected behavior
- “Closing gitlab-ce#123” should be preserved in the merge commit message
Actual behavior
- “Closing gitlab-ce#123” is not added to the merge commit message
Results of GitLab application Check
$sudo gitlab-rake gitlab:check SANITIZE=true
I, [2017-01-11T09:20:25.901404 #5016] INFO -- sentry: ** [Raven] Raven 2.0.2 ready to catch errors
Checking GitLab Shell ...
GitLab Shell version >= 4.1.1 ? ... OK (4.1.1)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
6/2 ... ok
6/3 ... ok
9/5 ... ok
10/6 ... ok
10/7 ... ok
6/8 ... ok
11/9 ... ok
6/10 ... ok
17/12 ... ok
6/13 ... ok
49/14 ... ok
6/15 ... ok
14/16 ... ok
12/17 ... ok
16/18 ... ok
7/19 ... ok
6/20 ... ok
15/21 ... repository is empty
13/22 ... ok
6/23 ... ok
7/25 ... ok
17/26 ... ok
17/27 ... ok
6/28 ... ok
6/30 ... ok
7/31 ... ok
18/32 ... ok
7/33 ... ok
6/34 ... ok
10/35 ... ok
7/36 ... ok
7/37 ... ok
21/38 ... ok
7/40 ... ok
10/41 ... ok
19/42 ... ok
21/43 ... ok
22/44 ... ok
23/45 ... ok
11/46 ... ok
4/47 ... ok
20/49 ... ok
26/51 ... ok
21/52 ... ok
63/54 ... ok
6/55 ... ok
22/56 ... ok
4/57 ... ok
21/58 ... ok
29/59 ... ok
7/60 ... ok
29/61 ... ok
30/62 ... ok
30/63 ... ok
31/64 ... ok
32/65 ... ok
33/67 ... ok
7/68 ... ok
6/70 ... ok
34/71 ... ok
30/72 ... ok
33/73 ... ok
33/74 ... ok
33/75 ... ok
33/76 ... ok
33/77 ... ok
33/78 ... ok
33/79 ... ok
33/80 ... ok
33/81 ... ok
33/82 ... ok
33/83 ... ok
33/84 ... ok
33/85 ... ok
33/86 ... ok
33/87 ... ok
33/88 ... ok
33/89 ... ok
21/90 ... ok
21/91 ... ok
33/92 ... ok
27/93 ... ok
10/94 ... ok
21/96 ... ok
21/97 ... ok
33/98 ... ok
34/99 ... ok
7/100 ... ok
7/101 ... ok
7/102 ... ok
7/103 ... ok
7/104 ... ok
7/105 ... ok
33/106 ... ok
41/107 ... ok
44/108 ... ok
21/109 ... ok
21/110 ... ok
46/112 ... ok
34/113 ... ok
44/114 ... ok
44/115 ... ok
21/116 ... ok
34/118 ... ok
4/119 ... ok
6/120 ... ok
53/121 ... ok
53/122 ... ok
21/123 ... ok
50/124 ... ok
46/125 ... ok
46/126 ... ok
34/127 ... ok
21/128 ... ok
6/131 ... ok
57/132 ... ok
59/133 ... ok
59/134 ... ok
50/135 ... ok
34/136 ... ok
34/137 ... ok
61/138 ... ok
61/139 ... ok
61/141 ... ok
61/143 ... ok
61/144 ... ok
34/145 ... ok
6/146 ... ok
57/147 ... ok
61/148 ... ok
18/149 ... ok
30/150 ... ok
6/151 ... ok
18/152 ... ok
18/153 ... ok
6/154 ... ok
64/155 ... ok
64/156 ... ok
50/157 ... repository is empty
7/158 ... ok
33/159 ... ok
34/160 ... ok
34/161 ... ok
70/162 ... ok
70/163 ... ok
5/164 ... ok
21/165 ... ok
67/166 ... ok
6/167 ... ok
61/168 ... ok
6/169 ... ok
61/170 ... ok
33/171 ... ok
61/172 ... ok
6/173 ... ok
67/174 ... ok
4/175 ... repository is empty
75/176 ... ok
34/177 ... ok
6/178 ... ok
33/180 ... ok
76/181 ... ok
7/182 ... ok
77/183 ... repository is empty
34/184 ... ok
34/185 ... ok
21/186 ... ok
34/188 ... ok
6/189 ... ok
6/190 ... ok
34/191 ... ok
22/192 ... ok
22/193 ... ok
22/194 ... ok
22/195 ... ok
6/196 ... ok
6/197 ... ok
80/198 ... ok
22/199 ... ok
33/201 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
IMAP server credentials are correct? ... yes
Init.d configured correctly? ... skipped (omnibus-gitlab has no init script)
MailRoom running? ... can't check because of previous errors
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
6/2 ... yes
6/3 ... yes
9/5 ... yes
10/6 ... yes
10/7 ... yes
6/8 ... yes
11/9 ... yes
6/10 ... yes
17/12 ... yes
6/13 ... yes
49/14 ... yes
6/15 ... yes
14/16 ... yes
12/17 ... yes
16/18 ... yes
7/19 ... yes
6/20 ... yes
15/21 ... yes
13/22 ... yes
6/23 ... yes
7/25 ... yes
17/26 ... yes
17/27 ... yes
6/28 ... yes
6/30 ... yes
7/31 ... yes
18/32 ... yes
7/33 ... yes
6/34 ... yes
10/35 ... yes
7/36 ... yes
7/37 ... yes
21/38 ... yes
7/40 ... yes
10/41 ... yes
19/42 ... yes
21/43 ... yes
22/44 ... yes
23/45 ... yes
11/46 ... yes
4/47 ... yes
20/49 ... yes
26/51 ... yes
21/52 ... yes
63/54 ... yes
6/55 ... yes
22/56 ... yes
4/57 ... yes
21/58 ... yes
29/59 ... yes
7/60 ... yes
29/61 ... yes
30/62 ... yes
30/63 ... yes
31/64 ... yes
32/65 ... yes
33/67 ... yes
7/68 ... yes
6/70 ... yes
34/71 ... yes
30/72 ... yes
33/73 ... yes
33/74 ... yes
33/75 ... yes
33/76 ... yes
33/77 ... yes
33/78 ... yes
33/79 ... yes
33/80 ... yes
33/81 ... yes
33/82 ... yes
33/83 ... yes
33/84 ... yes
33/85 ... yes
33/86 ... yes
33/87 ... yes
33/88 ... yes
33/89 ... yes
21/90 ... yes
21/91 ... yes
33/92 ... yes
27/93 ... yes
10/94 ... yes
21/96 ... yes
21/97 ... yes
33/98 ... yes
34/99 ... yes
7/100 ... yes
7/101 ... yes
7/102 ... yes
7/103 ... yes
7/104 ... yes
7/105 ... yes
33/106 ... yes
41/107 ... yes
44/108 ... yes
21/109 ... yes
21/110 ... yes
46/112 ... yes
34/113 ... yes
44/114 ... yes
44/115 ... yes
21/116 ... yes
34/118 ... yes
4/119 ... yes
6/120 ... yes
53/121 ... yes
53/122 ... yes
21/123 ... yes
50/124 ... yes
46/125 ... yes
46/126 ... yes
34/127 ... yes
21/128 ... yes
6/131 ... yes
57/132 ... yes
59/133 ... yes
59/134 ... yes
50/135 ... yes
34/136 ... yes
34/137 ... yes
61/138 ... yes
61/139 ... yes
61/141 ... yes
61/143 ... yes
61/144 ... yes
34/145 ... yes
6/146 ... yes
57/147 ... yes
61/148 ... yes
18/149 ... yes
30/150 ... yes
6/151 ... yes
18/152 ... yes
18/153 ... yes
6/154 ... yes
64/155 ... yes
64/156 ... yes
50/157 ... yes
7/158 ... yes
33/159 ... yes
34/160 ... yes
34/161 ... yes
70/162 ... yes
70/163 ... yes
5/164 ... yes
21/165 ... yes
67/166 ... yes
6/167 ... yes
61/168 ... yes
6/169 ... yes
61/170 ... yes
33/171 ... yes
61/172 ... yes
6/173 ... yes
67/174 ... yes
4/175 ... yes
75/176 ... yes
34/177 ... yes
6/178 ... yes
33/180 ... yes
76/181 ... yes
7/182 ... yes
77/183 ... yes
34/184 ... yes
34/185 ... yes
21/186 ... yes
34/188 ... yes
6/189 ... yes
6/190 ... yes
34/191 ... yes
22/192 ... yes
22/193 ... yes
22/194 ... yes
22/195 ... yes
6/196 ... yes
6/197 ... yes
80/198 ... yes
22/199 ... yes
33/201 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.3)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.8.4)
Active users: 25
Checking GitLab ... Finished
(we will only investigate if the tests are passing)
Results of GitLab environment info
$ sudo gitlab-rake gitlab:env:info
I, [2017-01-11T09:21:50.838037 #5694] INFO -- sentry: ** [Raven] Raven 2.0.2 ready to catch errors
System information
System: Ubuntu 12.04
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Sidekiq Version:4.2.7
GitLab information
Version: 8.15.3
Revision: 76bd8dd
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://git.blanko.de
HTTP Clone URL: https://git.blanko.de/some-group/some-project.git
SSH Clone URL: git@git.blanko.de:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 4.1.1
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
Possible fixes
The ReferenceExtractor currently seems to check for Jira Issue Tracker. Perhaps this should also include a check for an enabled external issue tracker. https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/reference_extractor.rb#L31
Edited by 🤖 GitLab Bot 🤖