Revert commits cause an unresolvable discussion to be opened.
Summary
In GitLab CE 8.14.0, reverting a commit causes an associated merge request to have a discussion automatically opened. This discussion is missing the "resolve discussion" button, and if the "block merge requests until discussions are resolved" feature introduced in !7125 (merged) is enabled, the request cannot be merged.
Steps to reproduce
Create a feature branch and then revert a commit.
git checkout -b test_branch
echo foo >> some_file.txt
git add some_file.txt
git commit -m "This is a test commit."
git revert (the commit hash of the test commit)
git push origin test_branch
Open a merge request based on test_branch on GitLab.
Expected behavior
A mergeable merge request will appear.
Actual behavior
The merge request is blocked because a discussion has been opened. This discussion cannot be closed.
Relevant logs and/or screenshots
The b54 commit is the original commit. The 67b commit is a revert commit, with the default Git commit message of "This reverts commit (commit hash)."
Output of checks
Results of GitLab application Check
Checking GitLab Shell ...
GitLab Shell version >= 4.0.0 ? ... OK (4.0.0)
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: ...
19/6 ... ok
19/7 ... ok
19/8 ... ok
23/9 ... ok
23/10 ... ok
23/11 ... ok
23/12 ... ok
23/13 ... ok
24/14 ... ok
19/15 ... ok
19/16 ... ok
19/17 ... repository is empty
24/18 ... ok
24/19 ... ok
28/20 ... ok
28/21 ... ok
28/22 ... ok
28/23 ... ok
28/24 ... ok
28/25 ... ok
28/26 ... ok
28/27 ... ok
28/28 ... ok
28/29 ... ok
24/30 ... ok
24/31 ... ok
24/32 ... ok
24/33 ... ok
24/34 ... 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 ...
Reply by email is disabled in config/gitlab.yml
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: ...
19/6 ... yes
19/7 ... yes
19/8 ... yes
23/9 ... yes
23/10 ... yes
23/11 ... yes
23/12 ... yes
23/13 ... yes
24/14 ... yes
19/15 ... yes
19/16 ... yes
19/17 ... yes
24/18 ... yes
24/19 ... yes
28/20 ... yes
28/21 ... yes
28/22 ... yes
28/23 ... yes
28/24 ... yes
28/25 ... yes
28/26 ... yes
28/27 ... yes
28/28 ... yes
28/29 ... yes
24/30 ... yes
24/31 ... yes
24/32 ... yes
24/33 ... yes
24/34 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 16
Checking GitLab ... Finished
Results of GitLab environment info
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.6
Bundler Version:1.13.6
Rake Version: 10.5.0
Sidekiq Version:4.2.1
GitLab information
Version: 8.14.0
Revision: cde955c
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://gitlab.lan
HTTP Clone URL: http://gitlab.lan/some-group/some-project.git
SSH Clone URL: git@gitlab.lan:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 4.0.0
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
Add a "resolve discussion" button for discussions opened by a revert.
